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

Fix/hyperlist rendering #56

Merged
merged 3 commits into from
Jan 23, 2024
Merged

Fix/hyperlist rendering #56

merged 3 commits into from
Jan 23, 2024

Conversation

buckhalt
Copy link
Member

@buckhalt buckhalt commented Jan 19, 2024

The HyperList component is a virtualized list of data cards. The height of these data cards is calculated dynamically by using the react-dom server API renderToString.

Next 14 throws an error for importing this, despite the fact that the API is depreciated in React. This is because NextJS generates compiler aliases so that references to legacy browser code in react-dom/server throw errors.

This PR implements a workaround for this issue by bypassing the alias and maintaining the existing implementation.

next.js generates compiler aliases so that references to legacy browser code in react-dom/server throw errors. however, renderToString is depreciated. this bypass allows for using it
Copy link

vercel bot commented Jan 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fresco ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 10:09am

@buckhalt buckhalt marked this pull request as ready for review January 22, 2024 22:56
Copy link
Member

@jthrilly jthrilly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good PR (particularly the summary of the issue). Only thing I might have added would be the link where you found the magic import :)

@jthrilly jthrilly merged commit 9b14783 into main Jan 23, 2024
3 checks passed
@jthrilly jthrilly deleted the fix/hyperlist-rendering branch April 5, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants