Skip to content

Instantly share code, notes, and snippets.

@busypeoples
Created August 18, 2017 15:25
Show Gist options
  • Select an option

  • Save busypeoples/847d908ee0ed8e501883b04e0f554435 to your computer and use it in GitHub Desktop.

Select an option

Save busypeoples/847d908ee0ed8e501883b04e0f554435 to your computer and use it in GitHub Desktop.
Displaying different UI States nicely in Reason
We couldn’t find any files to show.
@stereobooster

stereobooster commented Aug 26, 2017

Copy link
Copy Markdown

How about?

type remoteData 'c 'e 'a =
  | Nothing
  | Loading 'c
  | Failure 'e
  | Success 'a;

Where 'c stands for cancel token, like in this example react/react#8883 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment