Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/singhtal/update-react-component
https://github.com/singhtal/update-react-component
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/singhtal/update-react-component
- Owner: singhtal
- Created: 2022-02-22T05:07:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-22T05:10:05.000Z (almost 3 years ago)
- Last Synced: 2024-10-23T13:01:42.606Z (3 months ago)
- Language: JavaScript
- Size: 155 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# update-react-component
Sometimes you need to force re-render on function based component. This is a simple custom hook to do force re-render.
Note: Custom hooks cannot be called inside callbacks.
### Usage
```js
import {useForceUpdate} from 'update-react-component';
``````js
useForceUpdate()
```