CoderStein compartilhou isso
Rant: I've been a React person for 7 years - now I hate it. - Reactivity is not needed for most of the use-cases. At least not what React does because... - In React it quickly becomes buggy if you add more dependencies than needed. But you should add all of them, right? Right... - After you add all of your "required" dependencies, you have to constantly monitor whether your useEffect breaks something else deep down or up the React tree (or who knows where else). who knows... - Functional approach is absolute trash - as the project grows it becomes unreadable. Yes, classes look old and functional approach seems fancy on small projects or on the landing page of React itself (for marketing purposes), but when you look at a React file with 500+ lines you're screwed with your useEffects and useCallbacks (which btw aren't that useful anyway) - you can't read your own code because... - You have to actively read the logic to understand each useEffect and useCallback which takes your time and energy. In classes you have method names that explicitly state what they do. In React you have useEffect(...) and who the hell knows what's inside it... Go read it.. - No in-built forms, API fetch, global state management, TS support - Context is trash, zustand is more readable, but it's another library... - You need open-source libraries for absolutely everything in React What React is good at, however, is JSX. I love JSX approach, it looks very readable and awesome. The logic part is trash... We'll probably switch to something else or invent our own way of writing React code (for now). Anyone can relate? #react #javascript #webdevelopment