Acceess /list renders a list page of items with navigation links. The list is partially fetched from api, and will fetch more when scroll down.

Click on any link, the url will be /list/itemId, and the item page will show in a side panel of list page.

If I scroll down to fetch more items, and clicked an item at the bottom of the list, the url changed and item page rendered in sidepanel, as expected.

But if refresh the page, the items list only shows a limited number of items, and current item will not be in the list on first render (only shows up after some scroll downs).

So if access /list/itemId directly, I'd like the item page to be rendered in root, not in list page's side panel.

Is this possible with react router dom?

0

There are 0 best solutions below