- Notifications
You must be signed in to change notification settings - Fork44
React 19.1 captureOwnerStack#146
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 ourterms of service andprivacy 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?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/React.res Outdated
| externalact: (unit=>promise<unit>)=>promise<unit>="act" | ||
| @module("react") | ||
| externalcaptureOwnerStack:unit=>Js.nullable<string>="captureOwnerStack" |
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.
If I understood the API, it should return null or string, so either use a@return orNull.t.
Freddy03hOct 31, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
I didn't know this decorator, thanks!
cddbda2 to9d612c9Compare| externalact: (unit=>promise<unit>)=>promise<unit>="act" | ||
| @module("react") @return(nullable) | ||
| externalcaptureOwnerStack:unit=>option<string>="captureOwnerStack" |
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.
Nitpick: add a doc comment with link tohttps://react.dev/reference/react/captureOwnerStack
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 there a way to format it? I don't see any other comment with link to the react doc.
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.
Doesn't mean you shouldn't add it.
Try something like /** url */
src/React.res Outdated
| @module("react") | ||
| externalact: (unit=>promise<unit>)=>promise<unit>="act" | ||
| @module("react") @return(nullable) |
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.
Actually@return(null_to_opt) would make the intention clearer as the API can only returnstring ornull according to the docs (but notundefined).
It seems
capureOwnerStackis the only new API in React 19.1 :https://github.com/facebook/react/releases/tag/v19.1.0📖captureOwnerStack Documentation
Maybe it's possible to have a release for 19.1 before working on React 19.2 new APIs