Skip to content

Commit

Permalink
Merge branch 'main' of github.com:/reasonml/reason-react into ref-as-…
Browse files Browse the repository at this point in the history
…prop

* 'main' of github.com:/reasonml/reason-react:
  Add CSS Box Alignment Module Level 3 (#847)
  Remove type callback duplicate
  feat(react): add startTransition (#838)
  feat(react): add isValidElement (#837)
  • Loading branch information
davesnx committed Jul 17, 2024
2 parents 152d64d + 15affd0 commit e00f56f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/React.re
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,9 @@ external component: componentLike('props, element) => component('props) =
external createElement: (component('props), 'props) => element =
"createElement";

[@mel.module "react"]
external isValidElement: element => bool = "isValidElement";

[@mel.module "react"]
external cloneElement: (element, 'props) => element = "cloneElement";

Expand Down Expand Up @@ -873,6 +876,10 @@ module Uncurried = {
external useTransition: unit => (bool, callback(callback(unit, unit), unit)) =
"useTransition";

[@mel.module "react"]
external startTransition: ([@mel.uncurry] (unit => unit)) => unit =
"startTransition";

[@mel.module "react"]
external useDebugValue: ('value, ~format: 'value => string=?, unit) => unit =
"useDebugValue";
Expand Down
6 changes: 6 additions & 0 deletions src/React.rei
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ external component: componentLike('props, element) => component('props) =
external createElement: (component('props), 'props) => element =
"createElement";

[@mel.module "react"]
external isValidElement: element => bool = "isValidElement";

[@mel.module "react"]
external cloneElement: (element, 'props) => element = "cloneElement";

Expand Down Expand Up @@ -561,6 +564,9 @@ module Uncurried: {
"useCallback";
};

[@mel.module "react"]
external startTransition: ([@mel.uncurry] (unit => unit)) => unit = "startTransition";

[@mel.module "react"]
external useTransition: unit => (bool, callback(callback(unit, unit), unit)) =
"useTransition";
Expand Down
10 changes: 7 additions & 3 deletions src/ReactDOM.re
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ module Style = {
~gridAutoRows: string=?,
~gridColumn: string=?,
~gridColumnEnd: string=?,
~gridColumnGap: string=?,
~gridColumnGap: string=?, /* Deprecated in favor of column-gap */
~gridColumnStart: string=?,
~gridGap: string=?,
~gridGap: string=?, /* Deprecated in favor of gap */
~gridRow: string=?,
~gridRowEnd: string=?,
~gridRowGap: string=?,
~gridRowGap: string=?, /* Deprecated in favor of row-gap */
~gridRowStart: string=?,
~gridTemplate: string=?,
~gridTemplateAreas: string=?,
Expand Down Expand Up @@ -392,6 +392,10 @@ module Style = {
~rubyAlign: string=?,
~rubyMerge: string=?,
~rubyPosition: string=?,
/* CSS Box Alignment Module Level 3 */
~gap: string=?,
~columnGap: string=?,
~rowGap: string=?,
/* Lists and Counters Level 3 - WD */
/* listStyle - already defined by CSS2Properties */
/* listStyleImage - already defined by CSS2Properties */
Expand Down
4 changes: 4 additions & 0 deletions src/ReactDOM.rei
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,10 @@ module Style: {
~rubyAlign: string=?,
~rubyMerge: string=?,
~rubyPosition: string=?,
/* CSS Box Alignment Module Level 3 */
~gap: string=?,
~columnGap: string=?,
~rowGap: string=?,
/* Lists and Counters Level 3 - WD */
/* listStyle - already defined by CSS2Properties */
/* listStyleImage - already defined by CSS2Properties */
Expand Down

0 comments on commit e00f56f

Please sign in to comment.