3 ms·
Redux, IMO is a beautiful state management library. Were you following Dan’s tutorial on Redux? Because that is a beautifully made tutorial as well. (https://e
by wawhal 8y ago
Redux, IMO is a beautiful state management library.
Were you following Dan’s tutorial on Redux? Because that is a beautifully made tutorial as well. (https://egghead.io/redux https://egghead.io/redux)
If you have tried to build a substantially big app with React alone, you will find yourself lost in passing down the props and callbacks and hoisting variables and what not. You definitely need a state management library where you can CRUD from all your React components. Thats where Redux/Mobx comes into picture, unless you want to write a new one.
I agree that Redux needs a lot of boilerplate though.
- freehunter 8y agoIt very well could be a problem with the tutorial I was using, where the author leaned too heavily on using Redux for everything. I wildly scaled back my usage of Redux after I got going. It's just too many moving parts, and I've never figured out how to debug it when something doesn't work. I end up with 'console.log("we made it to the action")' and 'console.log("we made it to the reducer")' and then 'console.log("we made it to mapstatetoprops")' followed by 'console.log("so why the hell is this.state.fbToken still null!?")'. Then I come to find out I forgot to add auth_reducer to the combineReducers in my reducers/index.js. I can't count the number of hours I've lost to stuff like this.
- acemarke 8y agoPer my other comment just above ( https://news.ycombinator.com/item?id=18784238 https://news.ycombinator.com/item?id=18784238 ), please try out our new `redux-starter-kit` package and see how much it simplifies things for you: https://redux-starter-kit.js.org/ https://redux-starter-kit.js.org/