Why I'm moving from React Native to Swift

Why I'm moving from React Native to Swift

Let's start by clearing this up, I am a massive fan of React. If you know anything about me I will talk your ears off on React JS and the practical uses of the front end library. The more I use and learn about the library the more I want to progress. I have countless projects, 5 or 6 books and days on days of research into React. However, I still don't believe I am that strong with the library, where I still require more time learning. I have a few projects I am working on and some more new projects on the horizon.

So why did I opt to build an app in React Native? A valid question. So another passion of mine is native applications. So with me wanting to strengthen my knowledge in React and building apps as a passion, React Native was the obvious choice. However, when I refer to Native applications, I was referring to Swift.

I have been using a lot of my spare time building Swift and learning the programming language. It then occurred to me, I had been trying to learn too much in a short period. I decided to use React Native to build apps while learning the core fundamentals of React JS. Hopefully, this makes sense and was the logical solution at this time.

I am now building a React Native blog application, which uses Redux for state management and a combination of Jest and Enzyme for testing. I had previously used Typescript and MobX for state management but opted for a different route for the app build.

I've been enjoying this project. Learning Redux has given me a better perspective on state management. Where now I have become more confident in my approach to this project. Using testing frameworks has also given me a new approach to building code. At the moment, I'm a functional tester, rather than test all kind of guy. This project is increasingly addictive to work on, where my passion for React is growing. I am hoping this will kick start me into reviewing and refactoring my previous builds. The GillCode site alone will require a change in state management and some TLC. So the learning phase is starting to come to an end and more towards implementing good practice, revising my code and beefing up my weak areas. Therefore my attention to building apps in React Native is coming to an end, where I will be more so implementing and working on my React Web apps. I am hoping more exposure and learning tools utilised with React will boost my confidence in projects.

So, what's my core goal of GillCode? Learning Swift! As my React projects will be an ongoing theme this year, I will be allocating some times to learn Swift. I will be documenting this process heavily, so stay tuned. My first project will be to rebuild my React Native App in Swift, which could be beneficial for understanding and comparing both.

So why do I want to learn Swift, rather than building in React Native? Ideally, I want to build a range of applications, not just for mobile but for tablet, TV and smartwatch. So far as I know this isn't applicable in React Native. Also after present research, I now that performance, although minuscule is greater in pure native applications. Whereas another hindrance of mine is Node and updating the React Packages to a higher framework. Currently, react is on version 17. I've had trouble in the past upgrading a React Native application, where I am thrown by the great console errors. This isn't an ongoing process that I want to perform every year for both web and mobile apps. Whereas, upgrading versions on Swift from my current understanding is a seamless task (from present research), hopefully!

Final thoughts. Although I am moving from reactnative to swift, the decision wasn't based on experience or issues/frustrations. It was pure curiosity. There are the advantages of pure native apps that have swayed me, but in no way am I closing off the React chapter of the GillCode.