Skip to content

jtberglund/gatsby-link-reason

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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