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