Skip to content

Instantly share code, notes, and snippets.

@painedpineapple
Created February 21, 2020 16:55
Show Gist options
  • Save painedpineapple/f191e1ec0bf720e3b94e47226bc785fc to your computer and use it in GitHub Desktop.
Save painedpineapple/f191e1ec0bf720e3b94e47226bc785fc to your computer and use it in GitHub Desktop.
type itemRenderer('a) =
{
.
"data": 'a,
"index": int,
"style": ReactDOMRe.Style.t,
} =>
React.element;
module FixedSizeList = {
[@bs.module "react-window"] [@react.component]
external make:
(
~height: int,
~itemCount: int,
~itemSize: int,
~width: string,
~layout: string=?,
~itemData: 'b=?,
~ref: ReactDOMRe.Ref.t=?,
~overscanCount: int=?,
~useIsScrolling: bool=?,
~onItemsRendered: unit => unit=?,
~children: itemRenderer('a)
) =>
React.element =
"FixedSizeList";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment