Skip to content
This repository was archived by the owner on Mar 17, 2024. It is now read-only.

Commit c4dec58

Browse files
committed
fix README
1 parent 22c9ce3 commit c4dec58

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

README.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,20 @@ The module can then be installed using [npm](https://www.npmjs.com/):
1919

2020
```bash
2121
# yarn
22-
$ yarn add @ts-graphviz/react
22+
$ yarn add @ts-graphviz/react react
2323
# or npm
24-
$ npm install @ts-graphviz/react
24+
$ npm install -S @ts-graphviz/react react
2525
```
2626

27-
### Peer Dependencies
27+
> Install [React](https://github.com/facebook/react/) as peerDependencies at the same time.
2828
29-
- [React and ReactDOM](https://github.com/facebook/react/)(>=16.8)
30-
- [ts-graphviz](https://github.com/ts-graphviz/ts-graphviz)
31-
- [@hpcc-js/wasm](https://www.npmjs.com/package/@hpcc-js/wasm) (Optional)
32-
33-
```bash
34-
# Peer Dependencies
35-
$ yarn add react react-dom ts-graphviz@"^0.13.1"
36-
```
37-
38-
## API
39-
40-
### Script
29+
## Example
4130

42-
```tsx
43-
import React, { FC } from 'react';
31+
```jsx
32+
import React from 'react';
4433
import { Digraph, Node, Subgraph, Edge, DOT, renderToDot } from '@ts-graphviz/react';
4534

46-
const Example: FC = () => (
35+
const Example = () => (
4736
<Digraph
4837
rankdir="TB"
4938
edge={{

0 commit comments

Comments
 (0)