https://github.com/pyramation/mermaid2react
https://github.com/pyramation/mermaid2react
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pyramation/mermaid2react
- Owner: pyramation
- License: mit
- Created: 2021-01-10T01:17:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-10T01:20:34.000Z (over 5 years ago)
- Last Synced: 2025-08-18T20:00:04.603Z (10 months ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mermaid2react
```sh
npm install mermaid2react
```
For SSR and backend rendering, it's not necessary to load mermaid js. Additionally, webpack and friends can create issues when importing the library into your package.
Hence, this repo was born, which uses `load-script` to dynamically load mermaid from a CDN.
## Usage
```js
import { Mermaid } from 'mermaid2react';
export const YourComponent = () => {
return (
|password| B(Verify)
B --> C{matches?}
C -->|yes| D[return token]
C -->|no| E[return false]
`} />
);
}
```