Skip to content

Instantly share code, notes, and snippets.

@busypeoples
busypeoples / UIPattern.re
Last active January 28, 2019 15:31
Slaying a UI Anti Pattern in ReasonML
/*
Slaying a UI Anti Pattern in ReasonML
Based on Kris Jenkins original writing.
http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html
*/
type remoteData 'e 'a =
| NotAsked
| Loading
| Failure 'e
| Success 'a;
@SllyQ
SllyQ / Dnd.re
Created November 14, 2017 11:27
open ExtUtils;
module DragDropContext = {
[@bs.module "react-beautiful-dnd"] external reactClass : ReasonReact.reactClass =
"DragDropContext";
Js.log(reactClass);
let make = (~onDragEnd, children) =>
ReasonReact.wrapJsForReason(~reactClass, ~props={"onDragEnd": onDragEnd}, children);
};
type messageDescriptor = {. "id": string, "defaultMessage": string};
[@bs.module "react-intl"]
external defineMessages : Js.Dict.t(messageDescriptor) => Js.Dict.t(messageDescriptor) =
"";
module FormattedMessage = {
[@bs.module "react-intl"] external formatMessage : ReasonReact.reactClass = "FormattedMessage";
let make =
(
@wokalski
wokalski / Readme.md
Last active February 21, 2020 12:44
BuckleScript friendly `vim` + official ocaml-lsp setup for Reason/OCaml

BuckleScript friendly vim + official ocaml-lsp setup for Reason/OCaml

Prerequisite: Install esy 0.6.0.

Steps

  1. Check esy version (it has to be >0.6.0)
  2. Create esy.json with the following contents next to package.json: