Skip to content

React 19 APIs #133

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

Merged
merged 16 commits into from
May 4, 2025
Merged

React 19 APIs #133

merged 16 commits into from
May 4, 2025

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Apr 27, 2025

Closes #130

@nojaf
Copy link

nojaf commented Apr 28, 2025

Makes me wonder if we should not bite the bullet and move jsxDOMProps here since we are having a major.

PRs like rescript-lang/rescript#7402 are a good example that the current setup isn't ideal.

@cknitt
Copy link
Member Author

cknitt commented May 3, 2025

Makes me wonder if we should not bite the bullet and move jsxDOMProps here since we are having a major.

Eventually we need to do this, yes. Not sure if I'd still like to include that in 12.0 though.

In any case, we need a version with React 19 support first that still works with ReScript 11, too.

`use(context)` seems to exactly replicate the `useContext(context)`
logic, and we want to maximize retro-compability (ie. not switch from
`useContext` to `use` for that under the hood).

simply adding `usePromise(promise)` seems to be the simplest, least
invasive way to add the functionality.
@Freddy03h
Copy link
Collaborator

I tested examples from react 19 blog post on a project:

  • useTransition
  • useActionState
  • useOptimistic (with a small change on optional updateFn)
  • @bloodyowl PR adding formAction
  • @bloodyowl PR on FormData

and everything works well, so for me it's ok! 👍

bloodyowl and others added 3 commits May 4, 2025 10:45
this **kinda** goes against the zero-cost philosophy, but I don't see a
world where users would not have to reimplement those.
@cknitt cknitt requested a review from Freddy03h May 4, 2025 09:47
@cknitt cknitt merged commit 78c2fcb into master May 4, 2025
1 check passed
@cknitt cknitt deleted the react-19 branch May 4, 2025 09:50
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.

Add support for react 19
4 participants