rfcs
rfcs copied to clipboard
Move auto-px to compat sub-package
Summary
Currently, Preact supports numerical values to style properties where the DOM expects strings with units, for example <div style={{ marginLeft: 20}}></div>. This RFC proposes moving this behavior to the preact/compat sub-package, such that Preact core (the behavior when just importing preact) will no longer support this. A developer will need to write <div style={{ marginLeft: "20px" }}></div> instead.
Links
Idea: we could have compat only turn on autopx the first time it sees a numeric value.