React 17 Dependency upgrade #1455
mannycarrera4
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
React 17 Update
Canvas Kit is planning to upgrade to React 17 in v7 . However, during the process we’ve found some interesting gotchas and we wanted let folks know about our findings and ask a few questions
In React 17, they introduced a new version of JSX Transform. Although this is technically not a breaking change, it does introduce a complexity for teams using Babel, Emotion, and the
/** @jsx jsx*/
pragmaCanvas Kit uses this pragma because we have instances where we use the css prop from emotion. When upgrading to React 17, we saw the following error:
pragma and pragmaFrag cannot be set when runtime is automatic.
This error comes from babel from version
7.9
and greater when they introduced automatic runtimeBecause of the following errors, we’ve had to think about our solution and wanted to communicate to our consumers the path we’ve chosen to move forward with.
Work in Progress
^17.x
or at least16.14
for backwards compatibility and we will remove thejsx
pragma and use ofcss
props. This does not mean consumers can’t use the css prop, just that internally we will stop using it. This would require teams to upgrade other parts of their app including React, potentially Babel and any other side effects that come with it.Questions for consumers
Beta Was this translation helpful? Give feedback.
All reactions