ReactJS to React Native

ReactJS to React Native


After two years doing web stuff in ReactJS, I have been itching to do a production ready React Native App.

Finally, a client asked, “You did React before, right?”

Me: “Yea”

Client: “Then React native shouldn’t be a problem?”

Me: “Yea, it should be quite similar”

Haha, I was so naive…


Here is a list of things that I wish I knew going from ReactJS to React Native

Although it’s jsx syntax, you’re not in web development world anymore

StyleSheet is similar, but not the same as CSS. There’s no global styles if it’s not imported.

Even if I want to do something like “`Text { color: white; }“`, I can’t…yet. (wink. wink. Facebook developers)

Remember to connect your device and your laptop to the same wifi if you’re using remote debugger.

“Responsive” Design take a lot more effort than defining media query

  • Think about big phone, little phone, portrait and landscape view.
  • Elie has a great implementation.
  • Or if you want a library solution.

Third party module can only take you so far

Move on to the next third party modules if one is not working, because react native changes fast. Some third party modules are just outdated.

Some companies only provide SDK in Object-C or Swift. Hope there’s a nice person who would write a wrapper for you, or have fun learning another language.

Learn to bridge native module

Live reload/Hot reload won’t save time from compiling native code

Remove unused modules when experimenting fails, or your life will be spent waiting for Xcode to compile

Be prepared for Build Failed, so before you link some new library commit your previous changes

  • rm -rf node_module && yarn i && cmd + K to clean build cache solves 80% of the problem

Native-like performance is not exactly native

  • setInterval lose accuracy when it’s under 1 second, see it in action
  • Excellent comparison between native iOS and react native, here.

Overall, React native is an awesome framework. It has granted me the ability to build mobile app quickly. Or else, I would still be learning Objective-C or Swift and starting from the basics. If you are a web developer thinking about moving into the mobile app world, I would say pick an idea and just do it. Please free to reach out to the online communities, or you can message me on Facebook.

Follow Captain of Destiny

Have fresh content delivered to your inbox

We won't send you spam. Unsubscribe at any time. Powered by ConvertKit

Leave a Reply

Your email address will not be published. Required fields are marked *