Due to implementing a nearly identical API, there is no separate Preact filter. Instead, the React filter also enables you to build Preact components.
When a class definition is encountered that derives from either
Preact::Controller, all of the transformations defined by the React
filter will be applied with the following differences:
importstatement for Preact will be generated
Preact.hand more simply
hcalls can be used to create elements. The JSX-like syntax as well as the Wunderbar syntax. continue to be supported, and will generate
Preact.hcalls and references to
onChangefunctions are automatically generated for controlled components. For compatibility,
onChangeattributes on these elements will be replaced with
onDoubleClickattributes will be mapped to
classNameattributes will be mapped to
htmlForattributes will be mapped to
For more information, see the examples provided.