User NavItem like React Link

Hello,

I am trying to use a NAVITEM to navigate to a react route (by setting the “to” attribute"), but this triggers a reload of the whole page.

Can I get a similar functionality to the react “LINK” ? or do I have to create my own OnClick event to handle that, which would be a bit painful as this is a quite basic feature in a react app

I am having the same issue. I can’t get the navigation to work. Are there any updates on this?

Hi @mfrey - PatternFly does not provide a router, so you’ll have to include your own and then use <NavItem><Link to="">My Link</Link></NavItem> .

On option is react-router 's successor @reach/router : https://reach.tech/router

You can follow a discussion on this issue on Slack as well: https://patternfly.slack.com/archives/C4FM977N0/p1595597212233900