Skip to content

Add usePromise for use(promise) #135

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 1 commit into from
May 3, 2025

Conversation

bloodyowl
Copy link
Contributor

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.

`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.
@cknitt cknitt merged commit 1694f22 into rescript-lang:react-19 May 3, 2025
@bloodyowl bloodyowl deleted the use-promise branch May 3, 2025 13:58
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.

2 participants