You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preact is a React clone that is gaining popularity. With minimal changes, react-templates might be modified to support preact as a target different than React or React native.
pass props, state to the render function. This is one of the few differences between preact and react (and is optional too). The change should be easy since we already do something similar for stateless functions (which are function(props, context)).
As for how to enable the preact syntax, I am for using the already existing --target-version, by simply telling --target-version preact.
Preact is a React clone that is gaining popularity. With minimal changes,
react-templatesmight be modified to supportpreactas a target different than React or React native.From my early experiments the changes needed are:
React.createElement. That is already implemented in PR #175, #179, #135, #93, #183, #184, #191, fix broken html tests, fix broken --react-import-path #176 with the new command line option--create-element-alias.props, stateto the render function. This is one of the few differences between preact and react (and is optional too). The change should be easy since we already do something similar for stateless functions (which arefunction(props, context)).As for how to enable the
preactsyntax, I am for using the already existing--target-version, by simply telling--target-version preact.