mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-22 20:01:57 +00:00
As referenced in https://reactjs.org/docs/context.html update the example to use the naming conventions used across the page.
19 lines
338 B
JavaScript
19 lines
338 B
JavaScript
class App extends React.Component {
|
|
constructor(props) {
|
|
super(props);
|
|
// highlight-range{2}
|
|
this.state = {
|
|
value: {something: 'something'},
|
|
};
|
|
}
|
|
|
|
render() {
|
|
// highlight-range{2}
|
|
return (
|
|
<MyContext.Provider value={this.state.value}>
|
|
<Toolbar />
|
|
</MyContext.Provider>
|
|
);
|
|
}
|
|
}
|