Using multiple layouts for react-router components

前端 未结 6 1531
执念已碎
执念已碎 2020-12-14 09:22

If I have the following:



  { /* Routes that use layout 1 */ }
  

        
6条回答
  •  时光取名叫无心
    2020-12-14 09:38

    You can use routes without a path to define containers that are not defined by the url:

    
    
      { /* Routes that use layout 1 */ }
      
        
        
        
        
      
    
      
        { /* Routes that use layout 2 */ }
        
        
      
    
    

    The layout components can then import additional components such as the top nav

提交回复
热议问题