-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Drop support for preact #896
Conversation
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
emotion/packages/is-prop-valid/src/props.js
Lines 463 to 466 in 7ea1715
// preact | |
for: true, | |
class: true, | |
autofocus: true |
is also for Preact, isn't it?
@Ailrun right, but at the moment is-prop-valid package is also used by other libraries (i.e. styled-components) and they expect preact support, considering that those are just 3 props, I would be in favour of keeping them here |
I agree with @Andarist. |
What:
Remove all the preact packages and stuff in the build setup for it.
Why:
Supporting preact is getting impractical, it was easy in the past when there were very few differences in the react and preact APIs but as react has added new APIs like
createContext
,forwardRef
andFragment
, it's getting significantly harder. While there are implementations of the new context API for preact, they aren't as performant as React'screateContext
and they can't have some of the upcoming features likeunstable_read
andstatic contextType = MyContext
.(before anyone says preact is implementing x and y, this isn't just about the current APIs that are missing in preact, it's about future APIs that we couldn't fully utilize because we would still have to support preact) Also,preact-emotion
has significantly fewer downloads (~1k vs ~150k downloads a week) thanreact-emotion
so the low demand for it doesn't justify the cost of maintaining it.Note that the
emotion
package will still be usable with preact and if someone wants to maintain a separate implementation of styled for preact, I'd be happy to give up thepreact-emotion
name on npm.How:
Checklist: