Serve another(standalone) page or static file in website built with react

前端 未结 6 1610
陌清茗
陌清茗 2021-02-02 09:53

I have a website built with react, which uses react-router. For some route I want to serve another page or static file, but since all request are forwarded to react router, its

6条回答
  •  北海茫月
    2021-02-02 10:16

    If you need /terms to redirect to /terms.html, the code below worked for me with react-router 3.x.

    const reload = () => window.location.reload();
    
      
                        
        
        
         } 
        />
         } 
        />
      
    
    

提交回复
热议问题