# ReactJS
* [https://reactjs.org/docs/](https://reactjs.org/docs/)
* [https://github.com/facebook/react/](https://github.com/facebook/react/)
* [https://github.com/facebook/react](https://github.com/facebook/react)
* [http://facebook.github.io/react-native/docs/](http://facebook.github.io/react-native/docs/)
* [https://github.com/reactjs/redux](https://github.com/reactjs/redux)
* [https://github.com/reactjs/react-redux](https://github.com/reactjs/react-redux)
* [https://github.com/facebook/react/tree/master/packages/react-dom](https://github.com/facebook/react/tree/master/packages/react-dom)
* [https://github.com/ReactTraining/react-router](https://github.com/ReactTraining/react-router)
##### Boilerplates
* [https://github.com/mikechabot/react-boilerplate](https://github.com/mikechabot/react-boilerplate)
* [https://github.com/kriasoft/react-starter-kit](https://github.com/kriasoft/react-starter-kit)
* [https://github.com/react-boilerplate/react-boilerplate](https://github.com/react-boilerplate/react-boilerplate)
```
#### notes ####
///
///
//
```
---
* source - [https://github.com/simoneas02/react-cheatsheet](https://github.com/simoneas02/react-cheatsheet)
## 🌈 React Cheat Sheet
> A simple cheat sheet for facilitate the process in the workshops and event about React. Let me know if you see any problem, I'll love a pull request for improve this document.
---
## Installation
* Add the tags in your HTML
```
```
* Run this scripts in your terminal
```
$ npm install react react-dom
```
---
## No configuration
Just start with React no configuration (run the scripts bellow in your terminal)
* Install the React
```
$ npm install -g create-react-app
```
* Create your application (change `myApp` to your application name)
```
$ create-react-app myApp
```
* Go to the application folder and install the dependencies
```
$ cd myApp
$ npm install
```
* Start your application
```
$ npm start
```
* Go to the browser by `URL` bellow and see your beautiful application
- [localhost:8080](http://localhost:8080)
---
## ReactDOM
```js
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
);
}
}
export default App
```
```js
//Index.js
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import App from './App.js';
class Index extends Component {
render() {
return (
);
}
}
ReactDOM.render (
,
document.getElementById('root')
);
```
---
## Hot Module Replacement
* Retain application state which is lost during a full reload.
* Save valuable development time by only updating what's changed.
* Tweak styling faster -- almost comparable to changing styles in the browser's debugger.
```js
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import MyComponent from './MyComponent';
ReactDOM.render( , document.getElementById('root') );
if (module.hot) {
module.hot.accept();
}
```
---
## Props
```js
import React, { Component } from 'react';
class App extends Component {
render() {
return (
My App {this.props.name}
);
}
}
class Index extends Component {
render() {
return (
);
}
}
export default App;
```
---
d
## Bindings
```js
import React, { Component } from 'react';
class MyComponent extends Component {
constructor () {
super();
this.state = { list: list };
this.doSomethingElse = this.doSomethingElse.bind(this);
};
doSomething = () => {
// do something
/* if don't have a parameter, you can use arrow function
and don't need to use bind */
}
doSomethingElse ( itemId ) {
// do something else
}
render() {
return (