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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems to break React Server Components #364

Open
Kyoss79 opened this issue Jan 30, 2023 · 4 comments
Open

Seems to break React Server Components #364

Kyoss79 opened this issue Jan 30, 2023 · 4 comments

Comments

@Kyoss79
Copy link

Kyoss79 commented Jan 30, 2023

Hello,

been using this library up to now.
It seems the library is using React Context internally,
which breaks the new NextJS App Directory using Server Components.

@trotzig
Copy link
Collaborator

trotzig commented Jan 30, 2023

Hi @Kyoss79! Can you point me where we are using React Context? It's been a while since I was in this codebase so I might be missing something but I can't find it.

I wouldn't be surprised if react-waypoint is incompatible with newer React tech (like NextJS app dir), so one possible solution would be for you to move to IntersectionObserver (either via a library or directly against the browser API).

@Kyoss79
Copy link
Author

Kyoss79 commented Jan 30, 2023

By looking through the code, the problem seems to be within "react-is".

c=Symbol.for("react.context"),u=Symbol.for("react.server_context")

Mhmm

@lencioni
Copy link
Collaborator

@Kyoss79
Copy link
Author

Kyoss79 commented Jan 31, 2023

i couldn't look any deeper into this and changed react-waypoint for react-intersection-observer.

Kinda sad, I liked your API more.

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

No branches or pull requests

3 participants