Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
Freddy03h wants to merge4 commits intorescript-lang:master
base:master
Choose a base branch
Loading
fromFreddy03h:captureOwnerStack

Conversation

@Freddy03h
Copy link
Collaborator

It seemscapureOwnerStack is 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

src/React.res Outdated
externalact: (unit=>promise<unit>)=>promise<unit>="act"

@module("react")
externalcaptureOwnerStack:unit=>Js.nullable<string>="captureOwnerStack"
Copy link
Member

@tsnobiptsnobipOct 31, 2025
edited
Loading

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.

Copy link
CollaboratorAuthor

@Freddy03hFreddy03hOct 31, 2025
edited
Loading

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!

externalact: (unit=>promise<unit>)=>promise<unit>="act"

@module("react") @return(nullable)
externalcaptureOwnerStack:unit=>option<string>="captureOwnerStack"
Copy link
Member

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

tsnobip reacted with thumbs up emoji
Copy link
CollaboratorAuthor

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.

Copy link
Member

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)
Copy link
Member

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).

Freddy03h reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cknittcknittcknitt left review comments

@tsnobiptsnobiptsnobip left review comments

@nojafnojafnojaf left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@Freddy03h@cknitt@tsnobip@nojaf

[8]ページ先頭

©2009-2025 Movatter.jp