I\'m developing a single-page ReactJS Web app but I know I\'m doing something wrong while defining my routing with React Router V4.
React Router V4
My problem is as follows
I found one possible solution here - use the path as the menu keys and provide the location as the selectedKeys:
selectedKeys
<Menu mode="inline" selectedKeys={[location.pathname]}> <Menu.Item key="/home"> <Link to="/home">Home </Link> </Menu.Item> ...
You can test the solution here
Hope it helps!