router
router copied to clipboard
Clicking on the link adds a search parameter. And it crashes when the page is refreshed.
Summary
https://user-images.githubusercontent.com/30148248/231264256-5f16be91-c804-4ece-8192-32a9d4339bcc.mov
If I change the name of the rest in the code sample, this time it adds a parameter with that name.
And when I refresh the page it doesn't work. When I delete the search parameter, which I don't know why it added, the page continues to work.
All I do is redirect to p/1 or p/2 as href.
Forwarding states
app
- (tabs)
- P
- [...rest].tsx
/P/1 => /P/1?rest=1
/P/2 => /P/2?rest=2
/P/test-product-name/1 => /P/test-product-name/1?rest=test-product-name&rest=1
The situation I want
P/1 => P/1
P/2 => P/2
/P/test-product-name/1 => /P/test-product-name/1
Minimal reproducible example
App Folder
Root Layout
ProductCard Component