3 ms·
For the vast majority of web apps, you’re going to need state that changes over time. Making individual components immutable is a nice architecture choice for s
by baddox 8y ago
For the vast majority of web apps, you’re going to need state that changes over time. Making individual components immutable is a nice architecture choice for several reasons, and hooks doesn’t really change that. Hooks just provide a way to plug state (which can change over time) into your components, which is something you already had to do. Where you were previously using class components, HOCs, or render props, you can now optionally use hooks, which have some well-documented advantages.