For example I have routes like:
<Route path="about" component={AboutPage} />
<Route path="status" component={StatusPage} />
Lets assume that the current route is '#/about'
. I need something like routerInstance.currentComponent
to return AboutPage
component instance.
Does React Router has a method to do it?
ps. I understand that accessing component instances from the outside is not the React Way to do things, but nevertheless I need it.