diff --git a/docs/Lifecycles.md b/docs/Lifecycles.md index 2a2a6fe5..d36e7636 100644 --- a/docs/Lifecycles.md +++ b/docs/Lifecycles.md @@ -1,3 +1,3 @@ # Lifecycle -*"Lifecycle Hooks"* modify and extend built-in React hooks or immitate React Class component lifecycle patterns. +*"Lifecycle Hooks"* modify and extend built-in React hooks or imitate React Class component lifecycle patterns. diff --git a/docs/createReducer.md b/docs/createReducer.md index 2b53c645..b61131fd 100644 --- a/docs/createReducer.md +++ b/docs/createReducer.md @@ -1,6 +1,6 @@ # `createReducer` -Factory for reducer hooks with custom middleware with an identical API as [React's `useReducer`](https://reactjs.org/docs/hooks-reference.html#usereducer). Compatible with [Redux middlware](https://redux.js.org/advanced/middleware). +Factory for reducer hooks with custom middleware with an identical API as [React's `useReducer`](https://reactjs.org/docs/hooks-reference.html#usereducer). Compatible with [Redux middleware](https://redux.js.org/advanced/middleware). ## Usage diff --git a/docs/useCopyToClipboard.md b/docs/useCopyToClipboard.md index 825db3c9..a4822b34 100644 --- a/docs/useCopyToClipboard.md +++ b/docs/useCopyToClipboard.md @@ -28,5 +28,5 @@ const [{value, error, noUserInteraction}, copyToClipboard] = useCopyToClipboard( ``` - `value` — value that was copied to clipboard, undefined when nothing was copied. -- `error` — catched error when trying to copy to clipboard. +- `error` — caught error when trying to copy to clipboard. - `noUserInteraction` — boolean indicating if user interaction was required to copy the value to clipboard to expose full API from underlying [`copy-to-clipboard`](https://github.com/sudodoki/copy-to-clipboard) library. diff --git a/docs/useKeyPressEvent.md b/docs/useKeyPressEvent.md index 02b1be1f..3b29b098 100644 --- a/docs/useKeyPressEvent.md +++ b/docs/useKeyPressEvent.md @@ -1,6 +1,6 @@ # `useKeyPressEvent` -This hook fires `keydown` and `keyup` calllbacks, similar to how [`useKey`](./useKey.md) +This hook fires `keydown` and `keyup` callbacks, similar to how [`useKey`](./useKey.md) hook does, but it only triggers each callback once per press cycle. For example, if you press and hold a key, it will fire `keydown` callback only once. diff --git a/docs/useMultiStateValidator.md b/docs/useMultiStateValidator.md index 42de5b1e..595fe3a6 100644 --- a/docs/useMultiStateValidator.md +++ b/docs/useMultiStateValidator.md @@ -50,6 +50,6 @@ const [validity, revalidate] = useStateValidator( - **`validity`**_`: [boolean|null, ...any[]]`_ result of validity check. First element is strictly nullable boolean, but others can contain arbitrary data; - **`revalidate`**_`: ()=>void`_ runs validator once again - **`validator`**_`: (state, setValidity?)=>[boolean|null, ...any[]]`_ should return an array suitable for validity state described above; - - `states` - current states values as the've been passed to the hook; + - `states` - current states values as they've been passed to the hook; - `setValidity` - if defined hook will not trigger validity change automatically. Useful for async validators; - `initialValidity` - validity value which set when validity is nt calculated yet; diff --git a/docs/useRendersCount.md b/docs/useRendersCount.md index 05f61111..13404993 100644 --- a/docs/useRendersCount.md +++ b/docs/useRendersCount.md @@ -1,6 +1,6 @@ # `useRendersCount` -Tracks compontent's renders count including the first render. +Tracks component's renders count including the first render. ## Usage diff --git a/docs/useStateList.md b/docs/useStateList.md index 82158dcd..d6e03e0a 100644 --- a/docs/useStateList.md +++ b/docs/useStateList.md @@ -41,7 +41,7 @@ const Demo = () => { const { state, currentIndex, prev, next, setStateAt, setState } = useStateList(stateSet: T[] = []); ``` -If `stateSet` changed, became shorter than before and `currentIndex` left in shrinked gap - the last element of list will be taken as current. +If `stateSet` changed, became shorter than before and `currentIndex` left in shrunk gap - the last element of list will be taken as current. - **`state`**_`: T`_ — current state value; - **`currentIndex`**_`: number`_ — current state index; diff --git a/tests/useLocalStorage.test.ts b/tests/useLocalStorage.test.ts index 95340c54..1c7df15c 100644 --- a/tests/useLocalStorage.test.ts +++ b/tests/useLocalStorage.test.ts @@ -34,7 +34,7 @@ it('should return initialValue if localStorage empty and set that to localStorag expect(localStorage.__STORE__[key]).toBe(`"${value}"`); }); -it('should return the value from localStorage if exists even if initialValue provied', () => { +it('should return the value from localStorage if exists even if initialValue provided', () => { const key = 'some_key'; localStorage.setItem(key, STRINGIFIED_VALUE);