When I was told I am going to work on a React Native project…
My thoughts before starting?
- mobile applications are tough;
- there are too many devices;
- iOS and Android, not a joke;
- apps must run smoothly;
My thoughts now?
- I can debug the app using Google Chrome, life is easy;
- the community is huge, still growing and everyone contributes;
For most apps, you will find the components you need. Don’t stress the fact that you will have to create new components. Just by being inventive (using what you have to your own advantage) and not being strict to a design you will finish an app pretty fast.
The hardest part is the first week 🙂 Getting adjusted to the technology, installing all you need, learn some mobile components and flexbox.
I’ve been working with React Native for a few months and I gradually started loving it.
What most helped me is their documentation. I read it once, started coding, read it again and again, and I keep finding new information I can use. There is so much valuable data, you just have to be extremely attentive on how you interpret it and not miss a thing.
Flexbox? Wow, flexbox gave me some headaches!
That’s why I find the documentation so important. It helps you with flexbox customisation and the transitions you need.
Before React Native I used to google an error and find my answer in the first three links.
Since React Native is still new, everything has changed. I had to look through a couple of pages until I found my answer, or maybe there was no answer for my problem.
What did I encounter?
Some of the problems I encountered were related to the emulator, connecting to my device, errors in code that close your application (yes, if you specify a property like backgroundColor twice in your stylesheet, you know what it does? It crashes your emulator. Yeah I know, weird stuff… At first it took me a while to figure it out 🙂 )
Developing on your device and connected to 4G ….? Well it won’t just work 🙂
What did I do?
- I investigated the problem furthermore (used debugger for this)
- I started communicating more with my teammates. Most of the time one of us encountered that problem before
- I started being more creative. Don’t have a component, try using what you have!
One of the most exciting parts of React Native is the community around it.
- We get updates from react native’s team every few weeks
- There are lots of contributors creating helpful components
- There are lots of contributors developing existing components
What I gained from React Native?
The fun part is that it gets you involved in the community.
There are a some components from facebook and you can find more on github. People created these for themselves and the community.
In order to find something on github, you need to know what you’re looking for. Here comes the mobile knowledge.
Depending on designs you might need to make adjustments and add customizable properties to the found components. What if you publish these adjustments? 🙂
For example, I needed a range slider (with double sliders) and a switch (with customizable colors) in my project. React native is providing SliderIOS but I needed one for Android. The switch component does offer a property for customizing color.
So I looked it up and found a component that has a range slider, a switcherand many more customizable components that I needed.
Here is the kit I found: https://github.com/xinthink/react-native-material-kit
But guess what, the switch had a bug. At the time it was not working on RN 0.22. Trying to fix it I published my first question on Github. The answer came in 2 minutes or so. How cool is that! The community is very involved and helpful ❤
So, I have the switch and the range slider. But….. I need a range slider with a step. Therefor, I have two options:
- Create a fork of this component and add a step that is not customizable and only I can use
- Or create a pull request with a dynamic solution and others could use it too 😉 (chose this one: https://github.com/xinthink/react-native-material-kit/pulls)
What are the benefits of react native?
- Helping each other
- Encourages you to get involved on Github
Keep in touch and see you on github! Don’t think only to yourselves and start contributing!