https://dev.to/elijahtrillionz/cleaning-up-async-functions-in-reacts-useeffect-hook-unsubscribing-3dkk - creative ways of unsubscribing #async functions in #React #useEffect hook. Nice article and code https://github.com/elijah-trillionz.
Just overflown the brand new React docs at https://react.dev
Lot's of the caveats discussed at https://react.dev/learn/you-might-not-need-an-effect can be prevented by just using Redux stores and thunks (yes yes yesπ) right from the beginning of your React project.
#redux #react #thunks #useeffect
Literally spent about a couple hours bashing my head against why I had duplicate rows when parsing the database data. I thought I wasn't using useEffect() correctly and started learning about its return value (cleanup) function.
Just asked myself if it might be possible to accomplish my goal without useEffect(). Fixed the issue by deleting like 3 lines of code... lol. π€¦ #useEffect #react #webdev
@ro I dont actually know alot about vue, thank you for telling me about it. ππΌ
However my experience is people usually are disappointed with #reactjs #footguns aka #useEffect, its dependency array issues, nextjs hydration issues, reactjs re-renders on client etc; these issues become pain points.
And then they turn to other libraries.
Also reactivity is absent in reactjs, however is there in all new frameworks such as svelte, solidjs & qwik etc.
Reactjs was good until SPAs were in trend.