- Redux is scrap - These days I use hooks and a tiny store with Immer, but I carry the golden lesson from Redux about one-directional data flow and UI as (mostly pure) function of state
- Centralizing API calls in one place
- Decoupling logic from components
- Any component that expects a state has a hook
- Components with index.js and index.scss
Less agree:
- CSS: Use styled components - I prefer Sass, CSS modules, Tailwind (gradually moving to latter)
- Route-based folder structure - Yes but more feature-based structure
- Native like Page Transition - Meh, not worth it unless done really well to improve UX
> Redux is scrap - These days I use hooks and a tiny store with Immer, but I carry the golden lesson from Redux about one-directional data flow and UI as (mostly pure) function of state
You've just reinvented Redux, except worse in every way. Just use Redux toolkit.
That's also the impetus that led to flow/relay "architecture" that led to redux in the first place. Possibly a reason such tools will continue to be reinvented every so often in React. React is a flat circle.
- Don’t use (almost) any libraries
- Redux is scrap - These days I use hooks and a tiny store with Immer, but I carry the golden lesson from Redux about one-directional data flow and UI as (mostly pure) function of state
- Centralizing API calls in one place
- Decoupling logic from components
- Any component that expects a state has a hook
- Components with index.js and index.scss
Less agree:
- CSS: Use styled components - I prefer Sass, CSS modules, Tailwind (gradually moving to latter)
- Route-based folder structure - Yes but more feature-based structure
- Native like Page Transition - Meh, not worth it unless done really well to improve UX
- Context - Never needed it