-
Notifications
You must be signed in to change notification settings - Fork 70
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
RFC: React 19 support #340
Comments
I tried to open a PR with this but there were many failing tests. I'm not sure if this was because of changes in React, or if it's related to changes in the the deprecated
|
@studiosciences I think you are correct - the test failures are related to the deprecation of |
Some of the test failures can be solved as follows: test('ld client is initialised correctly with deprecated user object', async () => {
const user: LDContext = { key: 'yus' };
const props: ProviderConfig = { clientSideID, user };
const LaunchDarklyApp = (
<LDProvider {...props}>
<App />
</LDProvider>
);
// Replace create with render from testing-library/react and wrap in act imported from React
await act(()=> render(LaunchDarklyApp));
expect(mockInitialize).toHaveBeenCalledWith(clientSideID, user, options);
}); |
@felsteadd I've done extensive research into this Any later |
Yeah it is not clear to me either. I have raised a support ticket with LaunchDarkly and it has been escalated to the engineering team for assessment and resolution. |
Hello @felsteadd and @studiosciences, thank you for raising this request this is on top of the engineering team's backlog (and a top support request). I am sorry that this is not as fast as you all hope and I can't provide an ETA yet. We are really thankful for the discussion and suggestions in this thread, which will help the SDK team address this faster. If you notice anything else that could help resolve the upgrade issue, please feel free to add to this thread. |
+1 |
|
@studiosciences Yes, I just double-checked that the typescript example app bumped to React 19 as the dependency, it runs correctly using the published 3.6.1 package to unblock people stuck on the dependency. But I think this doesn't address everything listed on this thread, so I am trying to see what else is needed - is the missing part bumping all the other |
@studiosciences @louis-launchdarkly the latest published version still lists React 18 types as a dev dependency and still uses the deprecated "react-test-renderer": "^18.0.0", "@types/react": "^18.0.3",
"@types/react-dom": "^18.0.0",
"@types/react-test-renderer": "^18.0.0", You should address all these issues to fully support React 19 with TypeScript. |
Is your feature request related to a problem? Please describe.
Support for React 19 is needed now that React 19 has been released.
Describe the solution you'd like
Add support for React 19
Describe alternatives you've considered
Overrides in package.json
Additional context
Following the upgrade steps at https://react.dev/blog/2024/04/25/react-19-upgrade-guide:
npm install --save-exact react@^19.0.0 react-dom@^19.0.0
Caused by:
react-client-sdk/package.json
Line 91 in ca6ebce
npm install --save-exact @types/react@^19.0.0 @types/react-dom@^19.0.0
Caused by:
react-client-sdk/package.json
Line 63 in ca6ebce
react-client-sdk/package.json
Line 64 in ca6ebce
react-client-sdk/package.json
Line 65 in ca6ebce
The text was updated successfully, but these errors were encountered: