React Native Workshop: By: Mochamad Halili MZ
React Native Workshop: By: Mochamad Halili MZ
By : Mochamad Halili MZ
2
Mochamad Halili
Developer Circle
MZ Surabaya
Email : [email protected]
[email protected]
Facebook : https://www.facebook.com/mochamz
Instagram:
https://www.instagram.com/moc.hamz
LinkedIn : https://id.linkedin.com/in/mochamz
Git : https://gitlab.com/mochamz
FIND MORE
3
React Native
The trend of using React Native for developing iOS and
Android apps is growing. But what exactly is React
Native and how does it work under the hood? To
understand this, we must first know a bit about React.
4
What is React?
React is a JavaScript library for building user
interfaces. A key concept in React is that of a
component. A component is a particular piece of the
user interface, such as this Facebook input field.
To display this component using React, our code
should look something like this:
render() {
return <WriteComment />;
}
5
What is React?
Components in React are composable and reusable. A
component can consist of other components and of
primitives. In the case of a web component, examples
of a primitive would be HTML elements such as div and
span.
render() {
return (
<div>
<ProfilePicture />
<CommentInput />
</div>
);
}
React is smart. It detects which components need to be
re-rendered based on the changes in the data, and
which not. This makes it fast and powerful, and that’s
why it’s a popular choice for development of web
applications.
6
Getting Started
Do this for new project.
• Install React Native (react-native init book)
• Go to book directory
• Install Native Base (npm install native-base --save && react-native link)
• Open your android emulator
• Run react-native run-android for make sure youre projects work
10
End Section