Skip to content

Commit d867554

Browse files
committed
chore: update readme
1 parent 1ba3013 commit d867554

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

README.md

+19-11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
### A react wrapper for [typed.js](https://github.com/mattboldt/typed.js)
44

5+
### react-typed v2 changelog
6+
7+
- Re-wright in typescript
8+
- Support for react 18
9+
- new property parseRef for supporting custom components that handles ref differently (see last example)
10+
- update docs with latest storybook version
511
---
612

713
[Installation](#installation)
@@ -49,17 +55,6 @@ const MyComponent = () => (
4955
);
5056
```
5157

52-
```javascript
53-
import { ReactTyped } from "react-typed";
54-
import { Input } from "antd";
55-
56-
const MyComponent = () => (
57-
<ReactTyped parseRef={(ref) => ref.current.input} attr="placeholder" strings={["Add a name here"]} typeSpeed={40} >
58-
<Input>
59-
</ReactTyped>
60-
);
61-
```
62-
6358
###### Using typed start, stop, toggle, destroy, reset functions
6459

6560
```javascript
@@ -84,3 +79,16 @@ const MyComponent {
8479
)
8580
}
8681
```
82+
83+
#### Using parseRef for custom components
84+
85+
```javascript
86+
import { ReactTyped } from "react-typed";
87+
import { Input } from "antd";
88+
89+
const MyComponent = () => (
90+
<ReactTyped parseRef={(ref) => ref.current.input} attr="placeholder" strings={["Add a name here"]} typeSpeed={40} >
91+
<Input>
92+
</ReactTyped>
93+
);
94+
```

0 commit comments

Comments
 (0)