Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"rescript": "^11.0.0"
},
"peerDependencies": {
"react": ">=19.0.0",
"react-dom": ">=19.0.0"
"react": ">=19.1.0",
"react-dom": ">=19.1.0"
}
}
}
3 changes: 3 additions & 0 deletions src/React.res
Original file line number Diff line number Diff line change
Expand Up @@ -451,3 +451,6 @@ external useOptimistic: (
/** `act` is a test helper to apply pending React updates before making assertions. */
@module("react")
external act: (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 return string or null according to the docs (but not undefined).

external captureOwnerStack: 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 to https://react.dev/reference/react/captureOwnerStack

Copy link
Collaborator Author

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 */