mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 04:12:34 +00:00
Minor: context/theme-detailed-app.js broken (#746)
* Minor: context/theme-detailed-app.js broken Today I tested out the new Context API using using [CRA](https://github.com/facebook/create-react-app). I encountered a runtime exception, so this tiny PR is intended to make it easier for future Context API learners. `ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor` create-react-app@next commit da518d2238298dd5db74e9c63c12251099f87bb0 * Update theme-detailed-app.js
This commit is contained in:
@@ -12,6 +12,7 @@ function Toolbar(props) {
|
||||
|
||||
class App extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
theme: themes.light,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user