-
Notifications
You must be signed in to change notification settings - Fork 127
Compatibility with Preact #658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is an important topic. Preact might be what we end up using for the Single Sign On page, eventually. I think Preact X came out after Emotion dropped support. In the upgrade docs for Preact X, they describe how Preact X is fully compatible with the latest version of styled components. Could be that the same is true for emotion, provided a matching tsc or babel config. Maybe @ForsakenHarmony can share some insights here. |
Yes, when aliasing react to preact X I don't think there are currently any known compatibility issues with emotion Most compatibility issues are considered bugs, but some special things react does, i.e. preactjs/preact#2852 are ruled out There are also no plans for concurrent mode right now, but most app don't need it (and the ones that do might be better off doing the performance critical parts outside of react) |
When working with forms, I ran into an issue with the The expected behavior for the
Working with I found an open PR dealing with some parts of the problem. My conclusion is that, currently, you cannot create an uncrontrolled input with a |
@felixjung
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Add a comment explaining why the issue is still relevant to prevent it from being closed. |
Apart from the general compatibility issues between React and Preact that @felixjung mentioned above (which might have been fixed by now), there doesn't seem to be anything further we can do inside Circuit UI. We have plans to replace Emotion.js with a build-time styling solution which should ensure future compatibility. |
Suggested technology
In applications where performance is critical (e.g. the marketing website), switching from React to Preact can decrease the overall bundle size significantly.
We need to investigate whether Circuit UI is compatible with Preact and what we would need to do to support it out of the box. This could be achieved through code changes or documenting the steps that users need to take to make them work together.
Note: Emotion stopped supporting Preact officially but it might be compatible anyway (#658 (comment)).
Alternatives
Preact is in itself an alternative to React, our current UI framework. I'm not aware of other React-compatible, performance-focused libraries.
Potential downsides
Officially supporting Preact might add significant amounts of work to maintain compatibility in the future.
The text was updated successfully, but these errors were encountered: