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

Add a way to disable hydration Errors #4770

Open
Alek99 opened this issue Feb 7, 2025 · 2 comments
Open

Add a way to disable hydration Errors #4770

Alek99 opened this issue Feb 7, 2025 · 2 comments
Labels
feature request A feature you wanted added to reflex

Comments

@Alek99
Copy link
Member

Alek99 commented Feb 7, 2025

Largely these error are out of the control of the user

if they are something like p in a p tag we should catch this by setting invalid children in the component so ideally no one hits this

Some wrap like so -

import React from 'react';

function MyComponent() {
  return (
    <div suppressHydrationWarning={true}>
      {/* Content that might cause hydration mismatch */}
    </div>
  );
}
@Alek99 Alek99 added the feature request A feature you wanted added to reflex label Feb 7, 2025
Copy link

linear bot commented Feb 7, 2025

@Alek99
Copy link
Member Author

Alek99 commented Feb 7, 2025

There may be a bigger discussion about always disabling there error - or disabling them by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature you wanted added to reflex
Projects
None yet
Development

No branches or pull requests

1 participant