For example, I have routes like:
<Route path="about" component={AboutPage} /> <Route path="status" component={StatusPage} />
Suppose the current route is '#/about' . I need something like routerInstance.currentComponent to return an instance of the AboutPage component.
Does React Router have a way to do this?
ps. I understand that accessing component instances from the outside is not a real way to do something, but I need it nonetheless.
source share