Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(react-link): wrap it into a single child #446

Merged
merged 1 commit into from May 2, 2022
Merged

Conversation

jrgarciadev
Copy link
Member

Closes #

馃摑 Description

Due to next/link doesn't support multiple children we have to wrap the NextUI children into a fragment

鉀筹笍 Current behavior (updates)

It's not possible to use the NextUI link as a next/link thought the as prop

馃殌 New behaviour

NextUI children were wrapped into a React Fragment in order to support next/link, NextUI will be able to use it as follows:

import NextLink from "next/link";
import { Link } from "@nextui-org/react"

export default function App() {
  return (
    <Link href="#" as={NextLink}>
      "First solve the problem. Then, write the code." - Jon Johnson.
    </Link>
  );
}

馃挘 Is this a breaking change (Yes/No): No

@jrgarciadev jrgarciadev added this to the 馃敟 v1.0.0-beta.7 milestone May 2, 2022
@jrgarciadev jrgarciadev merged commit 9c90e13 into next May 2, 2022
@jrgarciadev jrgarciadev deleted the fix/link-children branch March 20, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant