-
Notifications
You must be signed in to change notification settings - Fork 42
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
base: master
Are you sure you want to change the base?
React 19 APIs #133
Conversation
@@ -25,6 +25,23 @@ module Client = { | |||
external hydrateRoot: (Dom.element, React.element) => Root.t = "hydrateRoot" | |||
} | |||
|
|||
// Very rudimentary form data bindings | |||
module FormData = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is certainly not ideal, but I don't want to drag the new WebAPI in yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense for now. The folks that do use the new WebAPI can always convert it.
|
||
/** `use` is a React API that lets you read the value of a resource like a Promise or context. */ | ||
@module("react") | ||
external use: Usable.t<'value> => 'value = "use" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a good idea? Or should we just have multiple bindings for use
(useContext
, usePromise
, ...).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe multiple bindings is more ergonomic. With good code examples what they do, the difference in name is doable.
Makes me wonder if we should not bite the bullet and move PRs like rescript-lang/rescript#7402 are a good example that the current setup isn't ideal. |
Closes #130