1
0
mirror of https://github.com/kremalicious/umami.git synced 2024-12-24 18:26:20 +01:00
umami/hooks/useForceUpdate.js

10 lines
224 B
JavaScript
Raw Normal View History

import { useCallback, useState } from 'react';
export default function useForceUpdate() {
const [, update] = useState(Object.create(null));
return useCallback(() => {
update(Object.create(null));
}, [update]);
}