gatsby-link-reason

2.0.0 • Public • Published

gatsby-link-reason

Use gatsby-link in ReasonML

Installation

npm i gatsby-link-reason

Usage

See gatsby-link for documentation.

// MyGatsbyComponent.re
 
let component = ReasonReact.statelessComponent("MyGatsbyComponent");
 
let text = ReasonReact.stringToElement;
 
let make = _children => {
    ...component,
    render: _self =>
        <div>
            <GatsbyLink to_="/page_2">(text("Go to page_2"))</GatsbyLink>
        </div>
};
 
let default = ReasonReact.wrapReasonForJs(~component, jsProps => make(jsProps##children));

License

MIT

Package Sidebar

Install

npm i gatsby-link-reason

Weekly Downloads

6

Version

2.0.0

License

MIT

Unpacked Size

5.44 kB

Total Files

7

Last publish

Collaborators

  • jberglund