|
|
|
|
|
by mephitix
2661 days ago
|
|
>> simplest solution is usually the best one to start with. I typically start with redux ?? Redux is definitely not the simplest solution :) I’d argue that starting with local state (which is what hooks seems to be headed towards), then profiling, testing, and adding small amounts of debouncing code where appropriate is more aligned with your sentiment of “don’t prematurely optimize” vs starting with redux. |
|
There's a couple ways to approach building out an app:
- Start as small and as simple as possible, and add more pieces down the road once you need them
- Determine up-front if you think you'll need various pieces, and get that infrastructure in place at the start .
Either of those is a reasonable way to tackle things.
As a related note, I'll put in a pitch for our new Redux Starter Kit package. It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creating entire "slices" of state at once without writing any action creators or action types by hand:
https://redux-starter-kit.js.org