You probably want state management for any non-trivial project, from the start

This post is meant to be read in the context of its parent post "Lessons Learned on a React-Native Project". If you've stumbled on this particular page randomly, I'd recommend jumping over to that post and starting from there.

This was a point I struggled to recommend when I started React-Native. I'd heard the mutterings of cranky developers who'd been burnt by the complexity (and boilerplate) introduced by state management and as I tend to follow the YAGNI approach to software development, I held off introducing any sort of state management.

For this particular project however, this was a mistake. As we knew from the start it would be a non-trivial project (ie. more than a TODO list), having state management from the start would have saved us a lot of time. Now, when I say "state management", I'm not just talking about Redux or MobX (the two main contenders currently for state management). I'd actually include the React Context API in this. It's not state management in the same way that Redux or MobX are, but it definitely helps with passing very particular types of data around.

We ended up getting into a situation where we encountered a well-known (to those actually experienced with React) issue that can emerge: Prop Drilling. We were needing to pass components/classes around everywhere and it just felt incredibly nasty. If we'd looked at MobX or even the Context API, I think we would've saved ourselves a lot of pain.

Next Section -> "Conclusion"