mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-22 20:01:57 +00:00
13 lines
226 B
JavaScript
13 lines
226 B
JavaScript
// Before
|
|
class ExampleComponent extends React.Component {
|
|
state = {};
|
|
|
|
// highlight-range{1-6}
|
|
componentWillMount() {
|
|
this.setState({
|
|
currentColor: this.props.defaultColor,
|
|
palette: 'rgb',
|
|
});
|
|
}
|
|
}
|