-
Notifications
You must be signed in to change notification settings - Fork 923
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
React18 for Bit UI #5751
Comments
(Reference) new react-dom render syntaxreact-dom now has a new syntax to render the application. // v18
import React from 'react';
import ReactDOM from 'react-dom/client'; // <-- new import
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App/>) old syntax: // v17
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(app, document.getElementById('root')); V18 will still work with the old syntax, but will block most of the new features. Using the new syntax breaks everything, because |
Hi, react-native 0.69 has just been released and it is based on react 18. |
thanks. The biggest blocker is waiting for #5443 |
How much time more till we can use React 18 in BIT? |
any update regarding react 18? |
#5443 is merged, seems like we have another check! With that merge, why is "create @teatbit/react.env-17 as an escape hatch for developer who still want to use react 17." still needed? |
Come on, I want to use components in a React 18 project without getting warned by peer dependencies. |
Are there any status updates on the progress of this issue? My project is using React 18, so whenever I import a component from Bit, I get warnings about peer dependencies. I've tried creating a custom environment using React 18 and the latest @testing-library/react, but the tests fail because it's still running in React 17. We're using Bit to share components across multiple teams, but it's a real challenge when all of our components in Bit are limited to React 17. |
Has anyone solved the problem yet? |
This is a massive blocker for our team to use blitz... Many libraries are now only being built for React 18, and theres no way we're going to invest so much time into making components in bit that rely on outdated libraries for React 17. |
hi, this issue is unrelated to react-18 support for bit. |
IMPORTNAT
This is NOT about how to have React18 for your components. This is aoubt migrating Bit's UI to react18.
follow this to get react18 components - https://bit.cloud/teambit/react/react-env
In this issue I will track the milestones needed to switch from React 17 to React 18.
Breaking changes:
not supported by react native (!)@types/react
that breaks if there are v17 and v18 in the same project. (should be resolved by resolve @types/react from the react env #5750.)Stability
v18 is rather stable, but is still getting quick fixes.
The type changes are now rippling through the community, so it might take a while to get all the types fixed.
Suggested path
@teambit/react
to React 18 (easy)--> Released, v0.69.0
@teatbit/react.env-17
as an escape hatch for developer who still want to use react 17.ReactDOM.render()
methoddetails:
^18.0.0
, forreact
,react/dom
,@types/react
@types/react-dom
@testing-library/react
to^13.0.0
The text was updated successfully, but these errors were encountered: