Skip to content

Commit 99729f1

Browse files
committed
Update README.md
1 parent 5fb1935 commit 99729f1

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ yarn add react-segmenter
1313
## Usage
1414

1515
```tsx
16-
import React, { Component } from 'react'
16+
import React from 'react'
1717

18-
import MyComponent from 'react-segmenter'
19-
import 'react-segmenter/dist/index.css'
18+
import { TextSegmenter } from 'react-segmenter'
2019

21-
class Example extends Component {
22-
render() {
23-
return <MyComponent />
24-
}
25-
}
20+
const App: React.FC = () => {
21+
return (
22+
<TextSegmenter>Hello World!</TextSegmenter>
23+
);
24+
};
2625
```
2726

2827
## License

0 commit comments

Comments
 (0)