rsnext/examples/with-reasonml/bindings/Next.re
Anthony Mittaz 7f471a4463 Tweak ReasonML example (#7254)
* Lock bs-platform to 5.0.3 (avoiding issues with reason language server)

https://github.com/jaredly/reason-language-server/issues/275

* Reformat code

* Ask bucklescript to use es6 instead of commonjs

* Rework getInitialProps (can now use a promise)

* Ignore .bsb.lock
2019-05-05 13:02:27 +02:00

26 lines
641 B
ReasonML

module Link = {
[@bs.module "next/link"] [@react.component]
external make:
(
~href: string=?,
~_as: string=?,
~prefetch: option(bool)=?,
~replace: option(bool)=?,
~shallow: option(bool)=?,
~passHref: option(bool)=?,
~children: React.element
) =>
React.element =
"default";
};
module Head = {
[@bs.module "next/head"] [@react.component]
external make: (~children: React.element) => React.element = "default";
};
module Error = {
[@bs.module "next/head"] [@react.component]
external make: (~statusCode: int, ~children: React.element) => React.element =
"default";
};