mattjbray / bs-downshift

BuckleScript bindings for Downshift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bs-downshift

BuckleScript bindings for Downshift

npm Issues Dependencies Issues Last Commit

Demo

Coming soon

Install and setup

yarn

$ yarn add bs-downshift

bsconfig

Add bs-downshift to your bs-dependencies: bsconfig.json

"bs-dependencies": [
  "bs-downshift",
  "reason-react"
]

Usage

See examples folder.

Usage of render function

The render prop is a function that passes an object which contains methods and values.

In ReasonML, this object is represented as a module called ControllerStateAndHelpers.

To make use of the methods and values within that module, you need to call it by passing the argument type (which is of type ControllerStateAndHelpers.t and does effectively the binding to the JS object method) like:

render=(
  t => {
    ControllerStateAndHelpers.toggleMenu(t, ());
    /* ... */
  }
)

You can see that in the examples folder.

About

BuckleScript bindings for Downshift

License:MIT License


Languages

Language:OCaml 100.0%