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 dom hydrate #3

Merged
merged 9 commits into from
May 17, 2024
Merged

Fix dom hydrate #3

merged 9 commits into from
May 17, 2024

Conversation

calculuschild
Copy link
Owner

See naturalcrit/homebrewery#3478

[The dev build throws a console error about hydrate() being deprecated:

bundle.js:5698 Warning: ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot
printWarning @ bundle.js:5698
error @ bundle.js:5672
hydrate @ bundle.js:35308
start_app @ bundle.js:115099
(anonymous) @ bKgbDQxBsmMw:20

This is a stab in the dark, but is this coming from Vitreum? This line in particular:

	const clientSideHydrate = `;start_app=(props={},target=document.getElementsByTagName('main')[0])=>require('react-dom').hydrate(require('react').createElement(${opts.name}, props),target);`

possibly relevant react doc:https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis](https://github.com/naturalcrit/homebrewery/issues/3478)

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

Successfully merging this pull request may close these issues.

2 participants