Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Что происходит в текущем коде и как его можно улучшить?
- 1. updateState = () => this.state.imRambo = true;
- 2. users.map((user) => (<UserComponent {...user} />));
- 3.
- class MyComponent extends React.Component {
- state = {
- counter: 1,
- };
- incrementCounter = () => this.setState({ counter: this.state.counter + 1 });
- massIncrement = () => {
- this.incrementCounter();
- this.incrementCounter();
- }
- }
- 4. class MyComponent extends React.Component {
- constructor(props) {
- this.state = {ok: 200};
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement