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

Ignore SSR warning using explicit suppressHydrationWarning option #11126

Merged
merged 6 commits into from
Oct 7, 2017

Commits on Oct 6, 2017

  1. Ignore SSR warning using explicit suppressHydrationWarning option

    This lets you ignore the warning on a single element and its direct child
    content. This is useful for simple fields that you're expecting to fail
    such as time stamps.
    
    Note that this still won't patch up such content so it'll remain
    inconsistent. It's also not suitable for nested complex content that may
    change.
    sebmarkbage committed Oct 6, 2017
    Configuration menu
    Copy the full SHA
    1b21177 View commit details
    Browse the repository at this point in the history
  2. Pass parent type and props to insert/delete hydration warning hooks

    For this to work, we need to split the API into a container and normal
    version. Since the root doesn't have a type nor props.
    sebmarkbage committed Oct 6, 2017
    Configuration menu
    Copy the full SHA
    3489df3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ce62a4f View commit details
    Browse the repository at this point in the history
  4. Add fixture testing hydration warning

    Also fixing the render->hydrate API change in the fixture
    sebmarkbage committed Oct 6, 2017
    Configuration menu
    Copy the full SHA
    979bed6 View commit details
    Browse the repository at this point in the history
  5. Add hooks when text hydration doesn't match up

    The purpose of these hooks is to pass the parent context to them. I don't
    want to do that in the normal hydrateTextInstance hooks since this is
    only used in DEV. This is also in line with what happens if there is no
    text instance at all and we invoke didNotFindHydratableTextInstance.
    sebmarkbage committed Oct 6, 2017
    Configuration menu
    Copy the full SHA
    71e4d77 View commit details
    Browse the repository at this point in the history
  6. Move mismatch text hydration warning to the new hooks

    This lets us ignore this call when we have parent props available and
    the suppression flag is set.
    sebmarkbage committed Oct 6, 2017
    Configuration menu
    Copy the full SHA
    b3dfd2d View commit details
    Browse the repository at this point in the history