react-route,react-hot-loader.webpack (You cannot change ; it will be ignored)

后端 未结 7 1333
有刺的猬
有刺的猬 2021-02-13 13:16

it\'s my first project that use react,react-router,react-hot-loader,webpack-dev-server and webpack. when I chang

7条回答
  •  梦毁少年i
    2021-02-13 13:42

    I know this is an old question, but someone might find this useful. I tried a lot of stuff and what finally worked for me is:

    import React from 'react'
    import ReactDOM  from 'react-dom'
    import { Router, Route, Link } from 'react-router'
    import App from './index/app'
    import About from './index/about'
    import Inbox from './index/inbox'
    
    class Routers extends React.Component {
       private routes = (
          
              
              
          
       );
    
       render() {
          return ( 
             
                {this.routes}
             
           );
        }
    }
    

提交回复
热议问题