Skip to content

Static content optimization causes different hydration mismatch behavior for class/style order #4656

Open
@nolanlawson

Description

@nolanlawson

If you have a template like this:

<template>
  <div class={classes} style={style}></div>
</template>

And if the content is the same on the server and another on the client, except that the ordering is different:

// server
classes = 'a b'
style='color: red; background: blue;'
// client
classes = 'b a'
style='background: blue; color: red'

...then you get a hydration mismatch in the non-static-optimized case, but no mismatch in the static-optimized case.

This is kind of an edge-case-of-an-edge-case, but opening the issue to track this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughydrationHaving to do with hydration after SSR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions