-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Better React 19 support #22
Conversation
- `prevState` from form action is now undefined type by default - Added `formData` param in form action
Run & review this pull request in StackBlitz Codeflow. |
🦋 Changeset detectedLatest commit: 53d3860 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@types/react-dom@18.2.14, npm/@types/react@18.2.33, npm/next@14.2.1, npm/react-dom@18.2.0, npm/react@18.2.0, npm/typescript@5.2.2 |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
@SocketSecurity ignore npm/sharp@0.33.4 |
What's new:
useFormState
example touseActionState
from React 19.prevState
from form action is notundefined
type by default.formData
param in form action. As in React 19,<form>
will be reset after the action is completed, in that case, we can use theformData
to restore the form values, by returning theformData
back to the client (Note: Only support in React 19, [Flight] Support FormData from Server to Client facebook/react#28754)