commit
4047a7ec23
378 changed files with 29334 additions and 0 deletions
9
hooks/useForceUpdate.js
Normal file
9
hooks/useForceUpdate.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { useCallback, useState } from 'react';
|
||||
|
||||
export default function useForceUpdate() {
|
||||
const [, update] = useState(Object.create(null));
|
||||
|
||||
return useCallback(() => {
|
||||
update(Object.create(null));
|
||||
}, [update]);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue