Lessons Learned on a React-Native Project

Welcome to my post, dear reader, on my lessons learned on my first React-Native project.

I didn't expect this post to get so wordy, so I'm going to break down each of the above points into its own page, and link it to its respective lesson below. Hopefully that breaks it down into easily digestible chunks :) There, I'll delve into the details of why and how this lesson affected me and why it was important. I'll avoid code and in-depth technical lessons for the most part, as that isn't the focus of this post. Those will likely be separate posts, but linked back to this one.

If you want to take the "I really like reading long posts" path, head over here to see the post in its original form. I prefer this form, as I think it reads a little nicer visually but I've been told I'm weird for liking super long blog posts.

tl;dr

  1. React-Native is not a silver bullet. No cross-platform framework is.

  2. React-Native does not shield you from needing to know about the native aspects of the project.

  3. Understanding the underlying build tools is extremely important in order to be effective in troubleshooting issues.

  4. Your debugging experience is extremely important. If you're just doing random console.log/alerts everywhere you're in for a bad time.

  5. Feature development in React-Native is amazingly quick, but styling can be brittle at times.

  6. The React-Native ecosystem varies wildly in quality.

  7. Underlying dependencies can trip you up, and probably will.

  8. The React-Native dev experience is designed with Mac in mind, not Windows.

  9. Read the documentation. All of it. React-Native, React, Fetch, Gradle and XCode. All of it.

  10. I have no idea how to do effective testing in a React-Native project.

  11. If you've got native dev experience, you're at a huge advantage coming into React-Native.

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

  13. Conclusion

Whew. That's a lot of lessons. Overall, this was a fairly difficult for project for me. Not having had any experience in mobile development that wasn't Xamarin, coming into a React-Native project I realized very quickly how out of my depth I was. So, if you're still reading, great! Come with me on a journey of death and destruction exploration and discovery!

Before you start digging in though...

Caveats

  • I have no idea what I'm doing. Seriously. Even now, with this blog post, I just have slightly less of no idea what I'm doing.
  • I'm probably wrong with a few things. I've likely made assumptions or statements that anyone with knowledge of React-Native (or the respective native platforms) will probably go "uhhh... what?". If so, please yell at me politely on Twitter, and I'll add some updates where necessary.
  • Some of these issues were greatly exacerbated by my lack of any native mobile development knowledge coming in. Up until this project, most of my mobile development experience came in the form of Xamarin, which is the .NET variant of cross-platform mobile development.
  • I'm not covering Expo as part of this post. The main issue with Expo was as soon as you need to hook into anything not covered by its libraries you need to "eject" from the Expo project and then you're in the wilderness of React-Native anyway.

Good luck!