Change URL while selecting sidebar option #4541
                  
                    
                      NicoMartinic
                    
                  
                
                  started this conversation in
                Discussions
              
            Replies: 1 comment
-
| 
         the  @bharatkashyap perhaps we can make a section of of this callout about routing? That way we can also link to it for cases like this. Also, the use of slots here is a bit problematic. They will remount on every render. please read the guide at https://mui.com/x/common-concepts/custom-components/#correct-usage  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want after selecting and item from the sidebar to render the custom component according to the pathname. This is working just fine, but when selecting a component to render the URL doesn't update. So the url gets stuck with const router = useDemoRouter('/mydefaultvalue'). I've tryied to use navigate but still isn't working. Code below
Beta Was this translation helpful? Give feedback.
All reactions