Skip to content

Commit 2fe1ab8

Browse files
committed
No require() for components needed after hot-update.
1 parent fe55b3d commit 2fe1ab8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

content/guides/hmr-react.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ render(App);
192192
// Hot Module Replacement API
193193
if (module.hot) {
194194
module.hot.accept('./components/App', () => {
195-
const NewApp = require('./components/App').default
196-
render(NewApp)
195+
render(App)
197196
});
198197
}
199198
```

0 commit comments

Comments
 (0)