How to use React Router with Electron?

后端 未结 7 906
生来不讨喜
生来不讨喜 2020-12-14 00:08

Using this boilerplate as reference I created an Electron app. It uses webpack to bundle the scripts and express server to host it.

Webpack config is practically sam

相关标签:
7条回答
  • 2020-12-14 00:40

    Agree with Niekert. But I believe it is better to handle like this before any route management.

    if ( window.location.pathname.includes('index.html') ) {
        location.pathname = ROUTES.ROOT;
    }
    
    0 讨论(0)
提交回复
热议问题