Skip to content

Commit e61d594

Browse files
onpawsgaearon
authored andcommitted
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
1 parent 85f3666 commit e61d594

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

examples/context/theme-detailed-app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function Toolbar(props) {
1212

1313
class App extends React.Component {
1414
constructor(props) {
15+
super(props);
1516
this.state = {
1617
theme: themes.light,
1718
};

0 commit comments

Comments
 (0)