React-Router onChange hook

前端 未结 2 1158
情书的邮戳
情书的邮戳 2021-02-08 03:34

I am having issues getting the onChange hook in react-router to work properly. Here is my routes file:

import React from \'react\';
import { Router, Route, brows         


        
2条回答
  •  佛祖请我去吃肉
    2021-02-08 04:11

    I'm using react-router ^2.4.0 and onUpdate did not work for me. I have instead used onChange on my base Route component.

    const Routes = (
        
            {/* App Routes */}
            
                
                
            
        );
    

提交回复
热议问题