React Native 15 months later

React Native 15 months later

As a web developer, native phone apps have always been a pain in the butt. The web as a platform is already a fast moving target in terms of skilling up and staying on top of what’s happening. Adding iOS and Android into the mix further dilutes your time and energy. Unfortunately, it also feels self-defeating to invest time in a web wrapped solution like Ionic because they’re clunky and it seems more like a temporary workaround rather than a solid long term solution.

This is why I was so excited in late 2015 when the alpha of React Native from Facebook hit the scene. It only supported iOS at the time but it was an exciting change. We could now use Javascript and React to control native components within an app. It was a change that promised native app performance with a huge improvement in development speed and accessibility. The barrier to entry felt much lower for developers in my situation.

I gave it a go and it worked reasonably well at first, I had a demo app running within a few hours and I could make small edits and it would show up in the emulator. But something happened right after, it felt like I crashed my car into a wall of complexity. As a backend developer, I was new to React, new to iOS and new to ES2015. The knowledge of divs and spans didn’t help me at all because the layout elements are different to the browser. Adding to that, the ecosystem was so young it was hard to find answers to issues. React native simply wasn’t mature enough for someone of my experience level to find their feet and build anything decent without investing huge amounts of time.

So I left it for a bit, and instead invested some of my learning time into understanding the fundamentals of Android and iOS development. I also pushed myself to wrap my head around React, Redux and the modern Javascript toolchain.

Fast forward 15 months and React Native has come a long way. I revisited it recently, and it was far better this time around. I managed to put together a basic 3-page app, complete with API requests within a day. The icing on the cake is that it works on both iOS and Android. That’s incredible compared to the progress (or lack of) I made with the native tools over the past few months.

The platform has dramatically improved in a few key areas:

  • Documentation / tutorials
  • Google-ability
  • Cross platform components
  • Stability / predictability

The first two items are the biggest hurdles for a tool when it's new and it's great that these issues have gone away since I first played with React Native. The cross-platform components are also a welcome addition. My needs are pretty simple, so the default components get me 80% of the way there. Lastly, there were very few bugs that I came across.

After I gained a little bit of confidence I started making my own components from scratch. Styling wasn't as restricted as I had originally thought. Flexbox is present and it's great to use but it did throw me some curve balls from time to time. Trying to track down where some margin/padding is coming in was tricky. To my knowledge, there's no CSS inspector like there is in the browser, so I resorted to using background colors on elements to work out what was happening.

All in all, I've put in about 15-20 hours into the project. It's probably got another 10 hours of work and 30 hours of testing and polish left before release. To put that into perspective, I've previously sunk 50+ hours into native Android and I've barely made a dent in learning it.

Regardless of how you feel about Facebook as a product, you can't deny their unrelenting contribution to the open source ecosystem. React Native is a great open source product and I recommend checking it out if you're a web developer looking to do some native apps on the side.

You coming to the React meetup tonight? Level 19, 160 Ann Street!

To view or add a comment, sign in

Others also viewed

Explore content categories