Browse Source

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
main
Pat 7 years ago
committed by Dan Abramov
parent
commit
e61d594b64
  1. 1
      examples/context/theme-detailed-app.js

1
examples/context/theme-detailed-app.js

@ -12,6 +12,7 @@ function Toolbar(props) {
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
theme: themes.light,
};

Loading…
Cancel
Save