-
Notifications
You must be signed in to change notification settings - Fork 27.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom anchor tag inside <Link> #816
Comments
In this case, use our imperative routing api via
|
I think |
That's the idea. |
Hmm, wrapping |
This is not the case anymore. You can use anything (but a plain string) as the direct descendant for a Thanks for reporting |
However, it's not possible to receive const Button = ({ href, children }) => (
<a href={href}>{children}</a>
)
const App = () => (
<Link href={{ pathname: '/stage', query: { id: 1} }}>
<Button>Starten</Button>
</Link>
) I'd like to seperate the linking behavior from the actual presentation (because |
Its possible to use onClickCapture to catch the click-event before it reaches the listener of the link. |
@impronunciable i think i love you. |
Stats from current PRDefault Server ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
Serverless ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Client Pages
Client Pages Modern
Client Build Manifests
Serverless bundles
Commit: 8945cbc |
I'm checking out the code here and it appears that you're enforcing an anchor tag to be the direct descendant of a
<Link>
.I'm having an issue because I like to create a layer of indirection for all of the basic HTML tags so I can customize them:
I also want to mention that forcing a
<Link>
to have an anchor as a child yet not providing the anchor tag seems a little superfluous... Anyways, what do you think we should do? I'm happy to help.The text was updated successfully, but these errors were encountered: