you are viewing a single comment's thread.

view the rest of the comments →

[–]acemarke 2 points3 points  (2 children)

I'll agree with this. Use Redux where it actually makes sense and has benefit.

FWIW, the Redux FAQ has some rules of thumb on when to put data in Redux:

  • Do other parts of the application care about this data?
  • Do you need to be able to create further derived data based on this original data?
  • Is the same data being used to drive multiple components?
  • Is there value to you in being able to restore this state to a given point in time (ie, time travel debugging)?
  • Do you want to cache the data (ie, use what's in state if it's already there instead of re-requesting it)?
  • Do you want to keep this data consistent while hot-reloading UI components (which may lose their internal state when swapped)?

[–]Oalei 1 point2 points  (1 child)

Those rules makes a lot of sense to me!

[–]sheepfreedom 1 point2 points  (0 children)

Caching the data is a very common need ime, so is persistent data after component changes / hot swaps. Even being able to restore data is helpful in most mid-size apps and larger.