DEV Community ðŸ‘Đ‍ðŸ’ŧðŸ‘Ļ‍ðŸ’ŧ

Erick Navarro
Erick Navarro

Posted on • Updated on

Working with React Native feels like Malcolm in the Middle father's changing a lightbulb

I have been an Android developer for 5 years, lately, I'm getting my hands on React Native. This is how I feel about it

malcom ligthbulb

To be honest, at first, glance seemed to me like an oversimplified layer for building apps. I did keep learning don't judge a book by its cover. So eventually I found out that native code can be used. That is my current endeavor by the way.

The way I see it, a long term project could benefit from shared code and anything troublesome due to the OSS should be native. You don't have to have 2 projects for creating a list of results, but you could benefit from the native implementation if you want to get the user location when the app is closed (I'm thinking on Android here).

Now to the funny thing:

  • Ok, I'm gonna install my dependencies... everything fails because my node install was made with sudo
  • Ok, now I have uninstalled node and re-install it without sudo (nvm actually)... I have to reinstall everything now
  • Ok so in Android Studio I had this plugin for restarting the app using keyboard shortcuts... and there is none for WebStorm
  • Ok so now I figure a couple of commands that will solve this, and now... how do I change the package name?
  • Ok so now I changed the package name for Android and IOS to the standard com.subdomain.appname now I'm gonna work... wait typescript seems to have a problem
  • Ok so now I have typescript working on my project and now I can work!
  • Ok so that last dependency is telling me that npm audit fix, sure... wait that update react-native version?
  • Ok so now I have to solve this new problem with AndroidX (I saw it coming from miles away)... sure let's add the right dependency and then let's add jetifier and...
  • Ho! So now I found another error and I can't run my app...
  • Ok so, now I'm going to rollback everything and now I'm sure I'm gonna be able to work.... (I'll let you know, I guess)

Regarding the latest problem, I didn't give up and had to figure a way to use the react-native-cli so you can see my SO answer

PS: I know about live reloading, I'm just improving my dev environment. And yes I know about --typescript template from the react-native cli, but I forgot about it... mistakes happen ÂŊ_(ツ)_/ÂŊ

UPDATE: this was updated shortly after publishing, and then 2 days later

Top comments (13)

Collapse
 
charrismatic profile image
Matt Harris

This has been like my entire week... super frustrating, especially where there's very common packages that have half updated to newer versions of RN and half held back. There were a few things I tried that I eventually decided were just impossible to install. Not to mention almost all the tutorials and example projects are outdated from the start. It gives a pretty bad impression of the community supporting react, how uncoordinated everything is.

Collapse
 
cutiko profile image
Erick Navarro

I think uncoordinated is the right word. Please don't get me wrong but, come on! AndroidX has been a subject from more than one year now. Starting this year mostly everything went out of beta to stable, so maintainers have had a lot of time to migrate things. At least in the Android community, we are doing it, and we are even paranoid about it, plenty of us is going with the minimal dependencies approach for fear of incompatibilities. React Native collaborators have done something amazing but I don't think the right attitude is just saying "is not our problem".

Collapse
 
jedashford profile image
Jed Ashford • Edited on

As a life long Android developer, I've fallen in love with react native. Keep in mind that there are tooling issues, but it's not like you won't have those with xcode or Android studio with a single platform install. Yes, I run into more problems with react native than I would with just an Android project alone, BUT I have far less problems than maintaining tools and knowledge for Android, iOS, Apple TV, and Android TV.

Over the air updates make it a must in place of native development. We release multiple times a day, running hundreds of combinations of tests. Creating good mobile products is impossible without the speed and release process we have with react native.

I'm a strong believer that it's the future, but yes, some painful tools and integrations. You cannot use RN without knowledge of both iOS and Android native development at the moment unless you jump over to full expo.

The problem with flutter right now is it's lack of Apple TV support, and dart.

Collapse
 
cutiko profile image
Erick Navarro

Can you send over the air updates without expo? In a react-native init project?

Collapse
 
jedashford profile image
Jed Ashford

Yup. Microsoft's code push is what the community uses for over the air updates. Very simple to integrate and use.

Thanks for the write up. Your spot on with many points.

Thread Thread
 
cutiko profile image
Erick Navarro

Love it, thanks!!!

Collapse
 
cutiko profile image
Erick Navarro

I think the new Flutter promise is to be able to be both mobiles and web as well, you should take a look at that then. Then the problem with Flutter it is, that is quite immature still.

Things I have done to improve my React Native development experience:

  • Fix problems from the start: dragging my node problem was dumb, that alleviate things a lot
  • Forget about VS Code, is basically a pretty version of Sublime Text with a bunch plugins. I'm using WebStom it is paid, but I think the real revenue is having good tooling, less headache.
  • Those commands I figure for restarting the app, in WebStorm I can run them using the IDE
  • Configure npm autocomplete to improve the terminal usability, you have to add this to your bash profile source <(npm completion)
Collapse
 
johnhalbert profile image
John Halbert

Literally describes my experience with every new stack I've ever picked up. I've just learned to embrace the frustration. ðŸĪŠ

The really weird thing is that after a week or two, you step away feeling hopeless about it, and the second you pick it back up, it's like second nature to you. ðŸ˜Ŋ

Everything makes sense and you're finally productive. So weird how it literally always happens this way.

Collapse
 
cutiko profile image
Erick Navarro • Edited on

Nah men, I have work with React, with Vue, does Wordpress count? Rails will work fine as long as you are not in Windows. Even my shallow attempts with Xcode are more stable. Done lot of stuff with Firebase, and believe me, there are a bunch of experimental things there and is still more kind.
By example, how are we going to solve the latest release broke Android? Ok... Im going to PR my way out of this? Surely I would but, damm so when do I finish my project?

Collapse
 
muganwas profile image
Muganwa

Lol, this is so accurate. I thought I was the only one.

Collapse
 
cutiko profile image
Erick Navarro

This reminds when I start working on Android using Eclipse...

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

Here is a post you might want to check out:

Regex for lazy developers

regex for lazy devs

Sorry for the callout 😆