3 ms·
Agree: - 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 abou
by lioeters 4y ago
Agree:
- 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
- dham 4y ago> 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.
- deleted 4y ago[deleted]
- schwartzworld 4y ago> one-directional data flow and UI as (mostly pure) function of state This is a fundamental react principal as well. It's how I wouod explain react to a newbie.
- WorldMaker 4y agoThat'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.