3 ms·
>> useEffect(() => { initializeApp(); }, [initializeApp]); Thats a weird bit of code. If the function changes execute it ? Ref: https://github.com/OpenC
by another_twist 1y ago
>> useEffect(() => {
initializeApp();
}, [initializeApp]);
Thats a weird bit of code. If the function changes execute it ?
Ref: https://github.com/OpenCut-app/OpenCut/blob/main/apps/web/src/components/editor-provider.tsx https://github.com/OpenCut-app/OpenCut/blob/main/apps/web/sr...
- bravesoul2 1y agoYou often end up doing this to please the linting deities. They want to make sure you call out dependencies. It annoys me alot when you know they won't change. And if they do (some reference change on render)... well that's just a footgun of React and I argue this doesnt help.
- another_twist 1y agoI think this is the one which detects dependencies of closure. react-hooks/exhaustive-deps is the rule I think. Makes sense. A few years back, a stale closure bug consumed two full working days and one full night for me.
- tonyhart7 1y agoso its a dumb technology or noo???
- madeofpalk 1y agoAll technology is dumb. The trick is recognising in which ways its dumb.
- tonyhart7 1y ago"All technology is dumb" implying that javascript and rust in the same tier is mistake
- bravesoul2 1y agoAll technology had blind spots. I think Rust might be async IO DX but that's based on what I read. I'd probably rather build some things (most things) in JS than Rust. It has GC and let's me focus more on the business problem. But id even more prefer Go Java or C#. But I'm a microservice monkey so ymmv.
- recursive 1y agoThis isn't just javascript. This is react on javascript.
- another_twist 1y agoIts a great lint rule imo, I would have appreciated having this one on back even I first used React