Next.js Discord

Discord Forum

Using `forwardRef` with an async server component yields a hydration error.

Unanswered
Smooth Fox Terrier posted this in #help-forum
Open in Discord
Smooth Fox TerrierOP
Simple example:

export const MyComponent = forwardRef(async function MyComponent(props, ref) {
  return <div ref={ref}>hi</div>
})


This will result in a hydration error everytime in a fresh project...

I searched through the docs, googled a bunch, checked stackoverflow, but I can't find an answer 😦

0 Replies