Replies: 2 comments
-
You'll probably have better luck creating your own wrapper Also, what happens if you have a URL with a search param? Do you append the existing ones as well? What about if you have duplicates? Does one overwrite the other, or do you append both?
|
Beta Was this translation helpful? Give feedback.
-
Do you append the existing ones as well? - If I have Not sure how to handle duplicates. For my particular application it does not matter how duplicates are handled. |
Beta Was this translation helpful? Give feedback.
-
I am creating a site. Every page of the site goes with
canisterId=XXX
GET param and optionalbackend=YYY
param.So, I want
ReactBrowser
'snavigate()
method as well as Link tags to preserve these GET params.For example,
<Link to="/bookmark">
should lead to/bookmark?canisterId=XXX
or/bookmark?canisterId=XXX&backend=YYY
rather that to/bookmark
.Is it implemented? How to do it?
I suggest to add to
(Browser)Router
attributepersistentParams
likepersistentParams={{canisterId: true}}
. Alternatively it could be done aspersistentParamsCallback={f}
wheref
receives a param and returns a boolean whether it should persist.Beta Was this translation helpful? Give feedback.
All reactions