Skip to content

Instantly share code, notes, and snippets.

View claudiojunior-me's full-sized avatar

Claudio Junior claudiojunior-me

View GitHub Profile
New Gist para sync-settings
## OK
class App extends Component {
render() {
return (
<div>
<span>Hello Word</span>
</div>
);
}
}
class App extends Component {
constructor(props) {
super(props);
};
}
class App extends Component {
componentWillMount() {
this.setState({ loading: true });
};
}
class App extends Component {
render() {
return (
<div>
<span>
Hello Word
</span>
</div>
);
}:
class App extends Component {
componentDidMount() {
// realiza uma chamada a uma API
};
}
class App extends Component {
componentWillReceiveProps(props) {
this.setState({ title: `App ${props.title}`});
};
}
class App extends Component {
shouldComponentUpdate(newProps, newState) {
return newProps.title !== this.props.title;
};
}