Is it ok to use localStorage instead of Redux or Context API?

This question was on my head when I started developing react apps.
There are many reasons than below to use redux over localStorage.
but at least

  1. Using Redux alongside react-redux is not only for store data. don’t forget that changing in a state will reRender All components that listen to that state. and that is really what react-redux does.
  2. stringify/parse from localStorage will make your app (on high-scale) slower and also will not sync all components while changing state.

Personal Recommendation After more than 4 years of developing React Apps, use REDUX with easy API like redux-toolkit or rematch

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)