Or how to make mobile development bearable again
"a framework that will wholly replace mobile development as we know it today."
"A javascript framework for cross-platform mobile development"
A Javascript library for building user interfaces
React is a library to declaratively to describe and structure UI.
<div class="content">
<div class="profile">
<img src="/avatars/1337.jpg" />
<span class="info">
<i class="name">John Doe</i>
<i class="title">CFO</i>
</span>
</div>
<span class="contentTitle">
Titles!
</span>
...
</div>
<Content title="Titles!">
<Profile photoId="1337" name="John Doe" title="CFO"/>
...
</Content>
Tons more readable!
<ScrollableList>
{
profiles.map( profile => (
<Profile ...profile>
))
}
</ScrollableList>
How the UI changes is up to you.
Just a function (or a class) that given a state, renders that state
Large open-source scene, thousands of reusable components
* https://js.coach
* https://github.com/jondot/awesome-react-native#components
* https://github.com/react-native-training/react-native-elements
But enough of that, what about the native?
Implementation-wise, RN is a custom screen that reads a js file to know what, when and where to draw.
This is a massive oversimplification please don't hurt me
Native modules!
React Native has some by default, but you can roll out your own, just implement an interface!
However, a rose without thorns doesn't exist.
{} + [] != [] + {}
* https://github.com/airbnb/native-navigation
* https://github.com/wix/react-native-navigation
* https://github.com/react-community/react-navigation
'react-native link' doesn't always work
Crossing the bridge takes time.
That's a lot to break compared to native toolkits.
Jest!
It depends, but take the plunge!
$ npm install -g create-react-native-app $ create-react-native-app my-app