Closed ahuigo closed 3 months ago
This doesn't appear to be a hydration bug actually, as hydration shouldn't diff props, but a bug in Preact's render diffing I think.
To reproduce: Repl
Looks like render()
will update the defaultValue
prop but clear value
Preact's hydrate will clear uncontrolled property(e.g.,
defaultValue="12"
), this is wrongI'm not sure if this is a fresh bug.
Demo:
https://fresh-demo-ahuigo.deno.dev/react/hello
Source code:
https://github.com/ahuigo/fresh-demo/blob/hydrate-bug/islands/react/hello.tsx