Kim vs React Native: Round 2

Do I need Redux?

Redux Lesson
Screenshot of the Getting Started with Redux lesson

Project: No Questions Asked
Get one new experience, per week, for 6 weeks.

I'm not the kind of the person to try every new dev tool without having a good reason why. When I first learned of Redux, a predictable state container for JavaScript apps, I was intrigued, but only because it seemed to be a common counterpart for React and React Native apps. Since I only just started learning both a few weeks ago, I was not eager to add another new thing into the mix.

When it comes to learning new things on time sensitive projects, I now try to follow the same rules I mentioned in my last post. I have to have a good reason, try it on real features and timebox the time spent learning it. In the case of Redux, I'm not ashamed to say, I never planned on trying it for this project. Mostly because I never knew why I needed it, until I built enough of the app to feel the pain point and when I did, I read this amazing article that clearly explains the benefits. My takeaway:

If you intend to share data amongst components then it's worth a test run, otherwise local state is enough.

While in hindsight I wish I could've implemented it sooner since it was perfect for my needs, I'm also glad I built it the hard way first. It allowed me to truly understand where and what I would need stored globally in Redux vs what each individual component or screen of the app would need stored locally. Thus, when it came to implementing Redux, I didn't store everything under the sun, just what I needed to be efficient.

If you're currently looking into or started playing around with React or React Native, I would say don't think about Redux until you’ve felt the pain point. Then, before you start coding anything, read Sam Corcos’ article on freeCodeCamp and watch the 30 free videos about getting started with Redux by Dan Abramov. And then hopefully, you can code with peace of mind. 

So what did I learn from this experience?

It’s fun to learn new things and grow in your craft but when you have a real project on your hands, it's important to be very mindful of when and what you use on the project. Don’t over-engineer your app by using languages or adding libraries just because it’s the next cool thing in dev. Use it because it solves a specific pain point and you truly understand the benefits.

I think it’s safe to say, I won this round too. 😉 

Work hard. Play hard.
~ Kim Goulbourne aka Bourn

CommentsHow do you approach new tools in dev?

arrow View Full Journal More Posts in Process arrow