Muhammad Azamuddin
PHP Indonesia @Microsoft Indonesia
March, 26th 2016
what is
JavaScript Library for building
ReactJS is V in MVC
ReactJS is V in MVC
ReactJS is V in MVC
ReactJS is V in MVC
what special about it?
if you want to learn Angular, learn Angular. But if you want to learn React, learn JavaScript
Product Search
Product List
Product Item
Product Widget
<ProductSearch/>
<ProductList/>
<ProductItem/>
<ProductWidget>
</ProductWidget>
<ProductItem/>
<ProductItem/>
ProductList.jsx
ProductSearch.jsx
ProductList.jsx
ProductItem.jsx
ProductWidget
Widget
ProductWidget.jsx
11561 results
Developer & Designer
You're on good company
Weppalyzer Sites Using ReactJS Detection
DESKTOP APP:
Atom Editor
Bracket Editor (Adobe)
SITES:
PayPal
Teespring
Uber (web App, clients, 15+ internal apps)
AirBnB
Docker
Codecademy
Web Whatsapp
More at https://github.com/facebook/react/wiki/Sites-Using-React
<p> Sebelum </p>
<p> Sesudah </p>
<p> Sebelum </p>
<p> Sesudah </p>
diff
apply
Virtual DOM
Real DOM
PATCH <p> from sebelum to sesudah
Patch
Component
Component
Component
Component
Component
Component
Component
data flows from components to components through properties
It's Java
This is ReactJS
// import declaration
import React, {Component} from 'react'
class MyComponent extends Component{
render(){
return <div>
Hello World
</div>
}
}
<MyComponent/>
// => "Hello World"
MyComponent.jsx
Usage
// import declaration
import React, {Component} from 'react'
class MyComponent extends Component{
render(){
return <div>
Hello {this.props.name}
</div>
}
}
<MyComponent name="John"/>
// => "Hello John"
Usage
MyComponent.jsx
// import declaration
import React, { Component } from 'react'
import Select from 'react-select'
var options = [
{ value: 'one', label: 'Australia' },
{ value: 'two', label: 'New Zealand' }
];
// render method
<Select
value="one"
options={options}
multi={true}
/>
// import declaration
import React, { Component } from 'react'
import GoogleMap from 'react-google-maps'
// render method
<GoogleMap
containerProps={{
...this.props,
style: {
height: `100%`,
},
}}
defaultZoom={8}
defaultCenter={{ lat: -34.397, lng: 150.644 }}
/>
JOIN US
Facebook Group @ReactJS Indonesia
Slack http://reactjsindonesia.slack.com
http://react.id