Skip to content
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

Preact? #965

Closed
ForsakenHarmony opened this issue Nov 30, 2016 · 15 comments
Closed

Preact? #965

ForsakenHarmony opened this issue Nov 30, 2016 · 15 comments

Comments

@ForsakenHarmony
Copy link

https://preactjs.com/

@levithomason
Copy link
Member

Is this an issue?

@ForsakenHarmony
Copy link
Author

not really, but preact support would be nice

@levithomason
Copy link
Member

Got it, I'd certainly be willing to merge PRs for increased compatibility. I'm not a Preact user so I'm not sure of the issues.

@ForsakenHarmony
Copy link
Author

ForsakenHarmony commented Dec 1, 2016

might be a bad idea after all, a fork would probably be a better idea

the only way to do this would be building twice

@levithomason
Copy link
Member

If the changes don't bring negative side effects, we can make them here. Though, I could see issues with regressions since I'm not sure how we'd test for Preact compatibility when shipping new features and fixes.

@ForsakenHarmony
Copy link
Author

https://preactjs.com/guide/switching-to-preact

you basically have to replace every import of react/react-dom or alias it, but idk about the other libraries used

@levithomason
Copy link
Member

Yep, this would need some investigation on a PR to figure out how to solve. I'm sure there will be lots of broken features. In a library like ours, we use many things that I'm betting are not supported, like event.nativeEvent.stopImmediatePropagation() or ReactDOM.unstable_renderSubtreeIntoContainer().

Again, I'd be willing to look over and merge PRs from the community on increasing compatibility with other libraries 👍

@developit
Copy link

I think preact-compat just needs to alias .nativeEvent there. We have the other API for sure.

@levithomason
Copy link
Member

Thanks for the clarification and correction on that. I'm on the look out for any PRs.

@WoLfulus
Copy link

Sorry to comment on a very old issue, but does this work today? @levithomason

@levithomason
Copy link
Member

No idea, I've never used Preact.

@davezuko may possibly have some insight? I think he may have converted some SUIR powered apps to Preact recently.

@dvdzkwsk
Copy link
Member

dvdzkwsk commented Aug 28, 2017

Most of this should be handled by preact-compat without any work from SUIR itself. I think it's a far better tradeoff to include the extra ~2kb for the compat layer than to fork SUIR specifically for Preact.

I, however, defer to @developit since he maintains Preact :P.

@redstrike
Copy link

redstrike commented Dec 13, 2017

@ForsakenHarmony Haven't you tried to use SUIR with preact-compat?
I want to use SUIR without introducing React into the runtime bundle.
However, not sure if we can get rid of React or preact-compat just act as a compatible layer on the top of React's base. Sr, I didn't notice that preact-compat has a standalone repo with its documentation. And we can get rid of the heavy React with Preact 😍

@levithomason @davezuko SUIR is an awesome project with impressive documentation. I think we shouldn't let it be locked in React's big empire. Will you plan to add some supports or official docs for Preact users?

@brianespinosa
Copy link
Member

@redstrike if you would like to add an Example Project to the SUIR documentation that shows how a SUIR project would be configured with preact and preact-compat, PRs are definitely welcome.

@levithomason
Copy link
Member

Will you plan to add some supports or official docs for Preact users?

Will I specifically? No, as I have no need or incentive for Preact. However, I am in full support of a community effort to accomplish this and will help move things along as much as I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants