You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
marcelmokos
changed the title
Compose link href from to property object with href, query and hash <Link to={{href?: string, query?: object, hash?: string}}>
Compose link href from to property object with href, query and hash
Feb 13, 2017
marcelmokos
changed the title
Compose link href from to property object with href, query and hash
Compose link href from "to" property object with href, query and hash
Feb 13, 2017
If you're using dynamic routes href is the path in the pages directory:
// Will link to /blog/hello-world#hashimportLinkfrom'next/link'consturlObject={href: "/blog/hello-world",hash: "hash"}<Linkhref={'/blog/[slug]'}as={urlObject}><a>text</a></Link>
Link element in ReactRouter comes with "to" property which can have href, query object and hash inside.
I prefer to build a query from an object instead of using string templates.
The text was updated successfully, but these errors were encountered: