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

Warning message outputted while using tooltip with nextjs #656

Open
yeungc opened this issue May 25, 2020 · 9 comments 路 May be fixed by #802
Open

Warning message outputted while using tooltip with nextjs #656

yeungc opened this issue May 25, 2020 · 9 comments 路 May be fixed by #802

Comments

@yeungc
Copy link

yeungc commented May 25, 2020

馃悰 Bug report

Current behavior

Console outputted below warning message when using tooltip in nextjs:
1

Steps to reproduce the bug

  1. Open sandbox: https://codesandbox.io/s/red-hill-xtu43
  2. See console logs
@open-collective-bot
Copy link

Hey @yeungc 馃憢,

Thank you for opening an issue. We'll get back to you as soon as we can.
Please, consider supporting us on Open Collective. We give a special attention to issues opened by backers.

If you use Reakit at work, you can also ask your company to sponsor us 鉂わ笍.

@ubbe-xyz
Copy link
Contributor

I was checking, it might happen because we try to render the Portal Tooltip ( given unstable_portal = true ). In theory <Portal /> should be just rendering null on the server though 馃 , maybe lifting the document guard up might help?

// Tooltip.tsx
if (options.unstable_portal && isClient) {
  element = <Portal>{element}</Portal>;

@yeungc
Copy link
Author

yeungc commented Jun 1, 2020

I was checking, it might happen because we try to render the Portal Tooltip ( given unstable_portal = true ). In theory <Portal /> should be just rendering null on the server though 馃 , maybe lifting the document guard up might help?

// Tooltip.tsx
if (options.unstable_portal && isClient) {
  element = <Portal>{element}</Portal>;

Thank you, but I have checked again, even if I set unstable_portal to true or false, the warning message is still here.

@ezhikov
Copy link

ezhikov commented Jul 22, 2020

Hi. I had same error with modal Popover. I found workaround in next.js examples - creating component which renders not just on client, but after hydration and passing it into as property of PopoverBackdrop. Same works for tooltip.

I'd like to look into Reakit itself to understand what is happening, but I'm completely unfamiliar with codebase, so it'll require some time.

@stale
Copy link

stale bot commented Oct 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 20, 2020
@diegohaz diegohaz removed the stale label Oct 20, 2020
@MMT-LD
Copy link

MMT-LD commented Nov 29, 2020

Hey,
i'm really liking Reakit! However, in NextJS app i get the same error as reported, but for popover modal: true. It would be great if popover (Modal) would allow for options.unstable_portal so i'm able to render my own portal rather then that of Reakit, which is what i did to fix the tooltip issue.

Just wandered on the progress of this ticket and if it was likely to get fixed? Thanks in advance 馃槃

@MMT-LD
Copy link

MMT-LD commented Oct 18, 2021

Hey, This has been stale for a while. Just wandered if this would get merged?

@marcospassos
Copy link
Contributor

Same issue here.

@skrytskaya
Copy link

This article https://blog.jannikwempe.com/react-pre-rendering-and-potential-hydration-issue helped me with my issue #1204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants