Skip to content

Commit

Permalink
change dynamic import example
Browse files Browse the repository at this point in the history
there shoud be `Bar.default` instead of `Bar`
  • Loading branch information
ForJing authored and jamiebuilds committed Aug 24, 2018
1 parent 652817f commit ba81d36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class MyComponent extends React.Component {

componentWillMount() {
import('./components/Bar').then(Bar => {
this.setState({ Bar });
this.setState({ Bar: Bar.default });
});
}

Expand Down

0 comments on commit ba81d36

Please sign in to comment.