-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support react@canary release #101
Comments
Can you add a references about the new apis, async component and promise node? |
I’ll append link RFC, actual PR and docs for each change. |
@mununki I attached link to body and added context node too. |
I don't know |
Please understand replacing next.js reference and PR instead official document, canary release doesn't have official document as React core team said (but API won't be break as possible..?). |
What about putting this on the forum(https://forum.rescript-lang.org/) and have a further community discussion about it? |
React have plans to add new valid element/node type, hooks and APIs as react canary released.
I summarized that required for upcoming react canary things. Can we support these?
New React hooks and APIs are:
(promise<'value> | context<'value>) => 'value
valueContainer<'value>
to express above as they defined value container in RFC.'value => 'value
export function cache<CachedFunction extends Function>(fn: CachedFunction): CachedFunction
useTransition(already bound, just ignore)useDeferredValue(already bound, just ignore)((. unit => unit) => unit)
New ReactDOM hooks and APIs are:
((. unit => unit) => unit)
(unit => { pending: boolean, action: promise<void> | (data: FormData) => unit, method: string, data: FormData })
(@uncurry ('state, ('state, 'action) => 'state)) => ('state, ('action) => unit)
State
postfix removed from another PR.Client Action Function Support:
string | (formData: FormData) => unit
<button formAction={(formData) => { ... }} />
<form action={(formData) => { ... }} />
Async component:
rescript input:
Async component JS output expectation:
New valid node:
Promise node:
expect output:
React.Context node
thank you for reading this.
The text was updated successfully, but these errors were encountered: