it\'s my first project that use react,react-router,react-hot-loader,webpack-dev-server and webpack. when I chang
Only thing you need to do, it's to throw out of render() method.
So, there are many ways to solve this issue.
Most Official way is what @Stormy say.
My solution like this:
const routes = (
)
// Don't let in render() method
class Routers extends React.Component {
render() {
return (
{ routes }
);
}
}