I\'m new to react world and I have line like this:
and on cli
Here's a CodePen to show it in action.
HTML
loading...
JSX
class NewComponent extends React.Component {
render() {
return (
new component
);
}
}
class Button extends React.Component {
render() {
return (
);
}
}
class App extends React.Component {
constructor() {
super();
this.state = {
clicked: false
};
this.handleClick = this.handleClick.bind(this);
}
handleClick() {
this.setState({
clicked: true
});
}
render() {
return (
{this.state.clicked ? : null}
);
}
};
React.render(
,
document.getElementById("root")
);