Skip to content

Commit dc491ae

Browse files
authored
Update README.md
1 parent ee67172 commit dc491ae

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,18 @@ const [state, actions] = useUndo(initialState);
9090

9191
##### Type: `Object`
9292

93-
| Key | Type | Description |
94-
| ------- | :--------: | ---------------------------------------------------------------------------------------- |
95-
| set | `function` | Assign a new value to `present`. |
96-
| reset | `function` | Clear `past` array and `future` array. Assign a new value to `present`. |
97-
| undo | `function` | See [handling-undo](https://redux.js.org/recipes/implementingundohistory#handling-undo). |
98-
| redo | `function` | See [handling-redo](https://redux.js.org/recipes/implementingundohistory#handling-redo). |
99-
| canUndo | `boolean` | Check whether `state.undo.length` is `0`. |
100-
| canRedo | `boolean` | Check whether `state.redo.length` is `0`. |
93+
| Key | Type | Description |
94+
| ------- | :--------: | ------------------------------------------------------------------------------------------ |
95+
| set | `function` | Assign a new value to `present`. |
96+
| reset | `function` | Clear `past` array and `future` array. Assign a new value to `present`. |
97+
| undo | `function` | See [handling-undo](https://redux.js.org/recipes/implementing-undo-history#handling-undo). |
98+
| redo | `function` | See [handling-redo](https://redux.js.org/recipes/implementing-undo-history#handling-redo). |
99+
| canUndo | `boolean` | Check whether `state.undo.length` is `0`. |
100+
| canRedo | `boolean` | Check whether `state.redo.length` is `0`. |
101101

102102
## How does it work?
103103

104-
Refer to [_Redux Implementing Undo History_](https://redux.js.org/recipes/implementingundohistory), `use-undo` implements the same concect with [`useReducer`](https://reactjs.org/docs/hooks-reference.html#usereducer).
104+
Refer to [_Redux Implementing Undo History_](hhttps://redux.js.org/recipes/implementing-undo-history), `use-undo` implements the same concect with [`useReducer`](https://reactjs.org/docs/hooks-reference.html#usereducer).
105105
The state structure looks like:
106106

107107
```js
@@ -120,4 +120,4 @@ It stores all states we need. To operate on this state, there are three function
120120

121121
## License
122122

123-
MIT © [xxhomey19](https://github.com/xxhomey19)
123+
MIT © [homerchen19](https://github.com/homerchen19)

0 commit comments

Comments
 (0)