Earlier quoted context omitted.
Take this example: const { useState } = React; function Person(props) { console.log('Render Person'); return ( { props.identity.firstName } { props.identity.lastName } ); } function App (props) { console.log('Render Hello'); const [count, setCount] = useState(0); const einstein = { firstName: "Albert", lastName: "Einstein" }; return ( setCount(count + 1)}>Increment ); } ReactDOM.render( , document.getElementById('con…
After all this time, React's sheer tonnage of boilerplate still astonishes me. That abstraction leaks like useMemo(…) even need to exist in the first place… Folks want to solve their own problems, but they keep getting saddled with React's as well.
> The pain and suffering of hooks all roots from the mismatch between a dogmatic belief in the superiority of immutability and the harsh reality of the host language that is JavaScript (Feb 25, 2023)
This fundamental misalignment with React and JavaScript is the billion dollar mistake.