React-router-dom bindings for Reason

This repository contains simple bucklescript bindings for react-router-dom v4.

There are some small differences in usage, mainly depending on how reason-react wants components to be passed as props.

The Route component expects a componentMake containing the wrapped component’s make function.

<Route path="/2" componentMake=Foo.make />

For components like Link or NavLink which expect a to prop containing either a string or an object, you’ll have to pass either a _to: string or a toObj: Js.t ({.. pathname: string} as 'a).

<NavLink _to="/"> ... </NavLink>
<NavLink toObj={"pathname": "/2"}> ... </NavLink>

Please not that this never intended to be a complete implementation of the library and that it was written as an exercise. Despite that, it works correctly except for a couple of missing things:

  • matchPath
  • withRouter
  • some types need to be improved

Related Posts

Adding static files to Yesod

Planning a simple Reddit clone with Yesod

Parsing complex foreign objects in PureScript

A way to deal with big objects and FFI.

Post requests with PureScript Affjax and Argonaut

Simple ajax calls to an API example

Functor, Applicative e Monad illustrati

Una guida chiara

Arbitrary length lists with QuickCheck

Using sized to build arbitrary length lists for QuickCheck

PureScript Impressions

Trying to put some sense in JavaScript

Clojure Examples

Toggling DELL 9350's touchpad on Ubuntu 15.10

How to set up a hotkey to toggle DELL 9350's touchpad on Ubuntu 15.10

Using the Asus MB168B+ with Ubuntu 15.10

How to edit the driver install script to make it work on Ubuntu 15.10+ (and other distros)