-
Notifications
You must be signed in to change notification settings - Fork 29.3k
Closed
Description
Describe the feature you'd like to request
- Codesandbox URL: https://codesandbox.io/s/supporting-number-type-for-next-link-ketl7u?file=/pages/index.js
I think it would be better to support the number
type for next/link children.
Can I open a PR to support it if it's okay with you? :)
Describe the solution you'd like
// packages/next/client/link.tsx
if (legacyBehavior && (typeof children === 'string' || typeof children === 'number')) {
children = <a>{children}</a>
}
Describe alternatives you've considered
Add a condition to check the type of children
Metadata
Metadata
Assignees
Labels
No labels