News for hackers. Stuff that matters.
Re:Making SetInterval Declarative with React Hooks by feralfoo on Tuesday February 05, 2019 @06:28AM (#19084366)
You could create userEffectOnce as a custom hook:

function useEffectOnce(callback) { useEffect(() => { return callback() }, []) }

There are no comments on this comment yet.