React react-router-dom 如何监听路由变化实现nprogress加载

#1

刚接触react 不久,请问各位大佬,在每次页面切换时,如何监听react-router-dom 路由切换,实现顶部nprogress 加载