Croma — My first react native app after 7 years of backend development
Tags: reactnative, javascript, sideprojects, design
Published: 2020-04-15 19:51:27

Well, I had done some javascript development(node.js) in the past but javascript has changed a lot after ES-6. TIll now my main focus has been backend development in java and ruby(RoR mainly). I am going to share my experience on writing [my first react native app](https://play.google.com/store/apps/details?id=app.croma).
![](https://miro.medium.com/max/251/1*uUyQpJj5ynQ6Fw-tdY1wwQ.gif)

I decided to learn react native and build something useful as well so decided to rewrite one of the popular app Croma that me and my friend Satyajit Sahoo developed back in 2014. Croma is an app to organize, generate and save color palettes focusing on simple clutter-free design. We could not get time to maintain it and it was written with a web view and native android. Since Satyajit Sahoo suggested to rewrite it in react native so I thought this is a good opportunity to learn react native. Let’s see how I build the initial version
![](https://miro.medium.com/max/538/1*Jr73IVaWbzGDrZV4C_9Y5g.gif)

### Get your hands dirty
The best way to learn a new framework or a language is to start building something and explore and learn along the way. So I started with a boilerplate react native app using expo as documentation said it’s easier to start with expo.
 ``` expo init  ```
I started hello word example app which has some basic functionality already present so this way I can start experimenting right away.
Expo is really easy to start as you can set up a working example app in 5 mins and see the real-time changes in the expo app.


### 80–20 % rule

I was able to build most of the functionality in few days but completing the whole project became tricky as I got caught up in issues and final styling, making it work with the web turned out to be more difficult than it seemed. I mainly struggled with web.
On mobile browser, the scrollview did not work 
Making it look good and understanding styling took some time for me.
Storage, icons etc. also required some debugging
Finishing something 100 % is way harder than it seems and the last 20 % of the work takes 80 % of the time.

### Have fun
Learning a new language or framework can be frustrating at the starting so it’s critical to not overthink and have fun while doing it. Don’t worry too much about getting all the details right. I am having fun building Croma and I have made it open source so feel free to jump in a fix some code that I have screwed up. Looking forward to learning from the community

![](https://miro.medium.com/max/600/1*ilIipBmmDARPw5Q-0074nQ.gif)
[a react native library I build while building croma](https://github.com/croma-app/croma-color-picker)

### The first impression of react native and learnings

* With expo it’s very easy to get started
* The concept of the component makes sense so easy to write reusable code
With ES6 features like async wait and JSX writing javascript has really become more fun
* Not everything can be done using react native as I tried to implement a [real-time color picker using Camera](https://github.com/croma-app/croma-react/pull/6) but the performance turned out to be really a bottleneck. So eventually I will have to move out of expo to implement this feature in the native.
* **The state of the react-native web is not good and I lot of the things just don’t work on the web. I still managed to fix most of the issues but you have to put extra effort to make things work on the web.**
* Github actions are awesome to automate the build and release process. I was able to automate web release using Github pages and android release using expo publish. See these [workflows](https://github.com/croma-app/croma-react/tree/master/.github/workflows) if you are also trying to do the same.
* I am learning so much about colors and design by building this app that I had very little chance to work on while doing backend development.
* You can also implement machine learning algorithms in javascript. I implemented a clustering algorithm to find out top prominent colors from an image and it’s working well. Try it out [here](https://croma.app).

Looking forward to seeing how people use the app. Please try it out [here](https://croma.app) or download it from the [playstore](https://play.google.com/store/apps/details?id=app.croma) and feel free to [send a PR and raise an issue](https://github.com/croma-app/croma-react/issues). 

Really excited about my react journey and looking forward to learning from the community. Thanks to [Satyajit Sahoo](https://twitter.com/satya164) and Bhuwan Joshi and for all the help.
Cheers!