Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Update the code demo for Link Overlay with a Routing Library #1346

Open
@arjunlubana

Description

@arjunlubana

Subject

LinkOverlay

Description

When trying to hoist a link in an encapsulating component. The code demo provided by the docs results in a Hydration Error. It is an issue that is closed in the core Chakra UI library here.

If this is done the docs way, the result wraps an tag inside another tag that results in the above hydration error.
image

To work around this in Next JS 13.

 <LinkBox as="article">
      <h2>
        <LinkOverlay as={NextLink} href="#" passHref>
          Some blog post
        </LinkOverlay>
      </h2>
      <p>
        As a side note, using quotation marks around an attribute value is
        required only if this value is not a valid identifier.
      </p>
      <a href="#">Some inner link</a>
    </LinkBox>

This would result in the following required output.

image

I have checked for any previous closed or related open issue. I have found none.
I would appreciate if I could change the docs demo code if possible.
Thank you.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions