This post is meant to be read in the context of its parent post "Lessons Learned on a React-Native Project". If you've stumbled on this particular page randomly, I'd recommend jumping over to that post and starting from there.
Now, to be clear, this isn't to bash on the amazing folks in the community who do open-source (henceforth referred to as OSS) work. This is an observation on the state of the React-Native ecosystem in general and the issues you may encounter.
- There are a lot of abandoned projects out there.
- These projects may be perfectly fine to use, especially the ones that don't need linking. Me personally though, I feel uncomfortable using a library that hasn't had any activity in ~2 years.
- You'll need to get used to trawling through the issues sections of GitHub repositories.
- Because React-Native is still so young (as of writing, we're currently on 0.57!) you will encounter many and varied issues. If you're having trouble with an odd behaviour of a bug and you go to raise an issue on that repository, please be nice. Everyone is a person and deserves courtesy and respect.
- Sometimes the issues you encounter (and even known to the repo owners) won't have a fix.
- You may need to rely on other people's forks of that repo, or specific branches which attempt to fix the issue that (for one reason or another) haven't made it into the master branch yet. Heck, you may need to fork a repo or two and make the changes yourself. On the plus side, hey you've just contributed to OSS! :)
- Be careful of React-Native libraries that only support one of the platforms.
- This isn't something I encountered too often, but sometimes people write libraries for the specific platform they're interested in and don't really care about the other. Which is perfectly reasonable. Hell, we're lucky they're sharing their work in the first place! If you encounter something like this, and you feel that strongly about it, either raise a PR adding support, or fork and maintain your own branch that supports both platforms! The magic of OSS continues!
When starting a React-Native project, I'd have a go-to set of resources you can fall back to. Luckily, the OSS community shines again in providing:
- React-Native-Community - A community-driven set of components for (you guessed it!) React-Native. This should probably be your first port of call when searching for a capability you don't get out of the box.
- Awesome-React-Native - A one-stop-shop for all your React-Native needs! This is a curated list of useful resources and I wish I'd spent some more time looking at this in depth. Though some of the above caveats (around abandoned projects and frustrating bugs) apply.
You might be thinking "uhh Adam, what about the React-Native docs?". I'll get to that later in this post :) It gets its own section!
Something which people tend to forget in the context of React-Native, especially with the noise of everyone yelling "Oh its a Facebook thing it must be great!" is... React-Native isn't even at Version 1 yet. It's (at time of writing) 0.57! As a result of that you may hit some rough edges. So if you're not prepared for that possibility, you're in for a bad time. And that's just React-Native itself, let alone the 3rd party libraries that have sprung up around it.
You'll want to be mindful of this when thinking "should I start a React-Native project?".
Next Section -> "Underlying dependencies can trip you up, and probably will"