mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-23 18:41:36 +01:00
10 lines
224 B
JavaScript
10 lines
224 B
JavaScript
|
import { useCallback, useState } from 'react';
|
||
|
|
||
|
export default function useForceUpdate() {
|
||
|
const [, update] = useState(Object.create(null));
|
||
|
|
||
|
return useCallback(() => {
|
||
|
update(Object.create(null));
|
||
|
}, [update]);
|
||
|
}
|