Re:Things I Don’t Know as of 2018
by freehunter on Sunday December 30, 2018 @01:13PM
(#18790469)
It 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.
Per my other comment just above ( 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:
Were you following Dan’s tutorial on Redux? Because that is a beautifully made tutorial as well. (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.