Skip to content

Commit

Permalink
feat(SuspenseList): add React.SuspenseList
Browse files Browse the repository at this point in the history
  • Loading branch information
r17x committed Apr 25, 2020
1 parent 3b04905 commit cdf788b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/js/src/React.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ var Fragment = /* module */[];

var Suspense = /* module */[];

var SuspenseList = /* module */[];

exports.Ref = Ref;
exports.Children = Children;
exports.Context = Context;
exports.Fragment = Fragment;
exports.Suspense = Suspense;
exports.SuspenseList = SuspenseList;
/* No side effect */
22 changes: 22 additions & 0 deletions src/React.re
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,28 @@ module Suspense = {
"Suspense";
};

/* Experimental React.SuspenseList */
module SuspenseList = {
[@bs.obj]
external makeProps:
(~children: element=?, ~revealOrder: string=?, ~tail: string=?, unit) =>
{
.
"children": option(element),
"revealOrder": option(string),
"tail": option(string),
} = "";

[@bs.module "react"]
external make:
component({
.
"children": option(element),
"revealOrder": option(string),
"tail": option(string),
}) =
"SuspenseList";
};
/* HOOKS */

/*
Expand Down

0 comments on commit cdf788b

Please sign in to comment.