Closed brauliodiez closed 6 years ago
Hello! I'm migrating to Nextjs in this fork.
I have a console.error with React-hot-loader It appears that "react-hot-loader/patch" did not run immediately before the app started While trying to fix this I read that WebPack has it's own HMR, so it's necessary to use ReactHotLoader?
Other question. index.html is necessary? With Nextjs I can´t use ReactDOM.render
const render = (Component) => {
ReactDOM.render(
<AppContainer>
<Component/>
</AppContainer>,
document.getElementById('root'),
);
};
so I replace it with
const index = () => (
<AppContainer>
<App />
</AppContainer>
);
export default index;
I'm not sure how I can do document.getElementById('root')
Thank you.
About react-hot-loader and wepack, since we stick to next, it provides all that we need, if we need to extend it we will need tu use netx.merge
Index.html won't be in use, tha't great
Next provides it's own way to move forward we have to stick with it
Good progress !!
Steps:
Understand how nextjs works:
Update dependencies on the project to the latests available, check that everything works.
Remove react router dependencies.
Add nextjs structure, plus pages.
Check that everything is working as expected and that server side rendering is triggered when needed.