Skip to content

Commit b923444

Browse files
committed
updated readme
1 parent e0703e8 commit b923444

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

README.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,25 @@
1010
npm install --save vant-react
1111
```
1212

13+
```bash
14+
yarn add vant-react
15+
```
16+
1317
## Usage
1418

1519
```tsx
16-
import React, { Component } from 'react'
17-
18-
import MyComponent from 'vant-react'
19-
import 'vant-react/dist/index.css'
20-
21-
class Example extends Component {
22-
render() {
23-
return <MyComponent />
24-
}
25-
}
20+
import React from 'react';
21+
22+
import Vant, { Button } from 'vant-react';
23+
24+
const Example = () => {
25+
return (
26+
<React.Fragment>
27+
<Vant.Button />
28+
<Button />
29+
</React.Fragment>
30+
);
31+
};
2632
```
2733

2834
## License

0 commit comments

Comments
 (0)