Skip to content

Commit 42fdb68

Browse files
authored
React 19.1 captureOwnerStack (#146)
1 parent c8c3d05 commit 42fdb68

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"rescript": "^11.0.0"
3434
},
3535
"peerDependencies": {
36-
"react": ">=19.0.0",
37-
"react-dom": ">=19.0.0"
36+
"react": ">=19.1.0",
37+
"react-dom": ">=19.1.0"
3838
}
39-
}
39+
}

src/React.res

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,3 +451,11 @@ external useOptimistic: (
451451
/** `act` is a test helper to apply pending React updates before making assertions. */
452452
@module("react")
453453
external act: (unit => promise<unit>) => promise<unit> = "act"
454+
455+
/**
456+
captureOwnerStack reads the current Owner Stack in development and returns it as a string if available.
457+
[Read more on the React Documentation](https://react.dev/reference/react/captureOwnerStack)
458+
*/
459+
@module("react")
460+
@return(null_to_opt)
461+
external captureOwnerStack: unit => option<string> = "captureOwnerStack"

0 commit comments

Comments
 (0)