Skip to content
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

Merged
merged 4 commits into from
May 18, 2024
Merged

Better React 19 support #22

merged 4 commits into from
May 18, 2024

Conversation

chungweileong94
Copy link
Owner

What's new:

  • Update the useFormState example to useActionState from React 19.
  • prevState from form action is not undefined type by default.
  • Added formData param in form action. As in React 19, <form> will be reset after the action is completed, in that case, we can use the formData to restore the form values, by returning the formData back to the client (Note: Only support in React 19, [Flight] Support FormData from Server to Client facebook/react#28754)

- `prevState` from form action is now undefined type by default
- Added `formData` param in form action
Copy link

stackblitz bot commented May 18, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

changeset-bot bot commented May 18, 2024

🦋 Changeset detected

Latest commit: 53d3860

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
server-act Minor

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

Copy link

socket-security bot commented May 18, 2024

Copy link

socket-security bot commented May 18, 2024

👍 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: npm/sharp@0.33.4

View full report↗︎

Next steps

Take a deeper look at the dependency

Take 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 package

If 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 risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

@chungweileong94
Copy link
Owner Author

@SocketSecurity ignore npm/sharp@0.33.4

@chungweileong94 chungweileong94 merged commit 20298bc into main May 18, 2024
3 checks passed
@chungweileong94 chungweileong94 deleted the react-19 branch May 18, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant