-
Notifications
You must be signed in to change notification settings - Fork 1.8k
How to pass params by Link ? #327
Comments
You can pass an object to the Link: <Link to={{
pathname: '/courses',
search: '?sort=name',
hash: '#the-hash',
state: { fromDashboard: true }
}}/> |
Will this work for you?
Assuming of course the "corpusId" you wanted exists already by the time you make that Link Well that is just ruining my formatting. basically there are backticks ` around the "/corpus.../tag" |
Why are people down voting @luish 's answer? That's the correct answer according to the docs.. |
I.. think its because its straight copy-pasted from the react-router docs and isn't tailored to the asker's original question? |
Well, my answer replied to the question in the title "How to pass params by Link?" |
I would like to know if there's a solution to past params "invisibles" in the query or if the params HAVE to be visibles ? |
Hi,
I know I can pass params by Route like
But that require set
component
, andcomponent
must be child of current page. That is inconvenient.I'd like to use Link like
Automatically pass tags to certain component.
The text was updated successfully, but these errors were encountered: