Files
2026-08-27 21:09:14 +00:00

17 lines
314 B
JavaScript

function Component(props) {
const dispatch = useDispatch();
useFreeze(dispatch);
// onUpdate should be memoized even though it doesn't
// flow into the return value
const onUpdate = () => {
dispatch({kind: 'update'});
};
useEffect(() => {
onUpdate();
}, [onUpdate]);
return <div />;
}