When importing server rendered DOM, statics may not match when Elements
are reused. Ideally, a no-op patch should be applied (which would avoid
this problem), but it is not always feasible. Ideally, key should also
be used when statics are used, but some server-side rendered DOM might
omit keys (e.g. to reduce the payload transmitted).
If the condition changes on the first patch (did not do a no-op patch), and you do not include keys in the server rendered DOM, then we want to make sure we end up with the right class value.
When importing server rendered DOM, statics may not match when Elements are reused. Ideally, a no-op patch should be applied (which would avoid this problem), but it is not always feasible. Ideally, key should also be used when statics are used, but some server-side rendered DOM might omit keys (e.g. to reduce the payload transmitted).
For example, if you have something like:
If the condition changes on the first patch (did not do a no-op patch), and you do not include keys in the server rendered DOM, then we want to make sure we end up with the right
class
value.