How to use the reason-react/lib/es6/src/reasonReact.js.statelessComponent function in reason-react

To help you get started, we’ve selected a few reason-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nwaywood / react-fullstack-template / lib / es6 / app / src / GreetingTwo.js View on Github external
// Generated by BUCKLESCRIPT VERSION 2.0.0, PLEASE EDIT WITH CARE
'use strict';

import * as Utils       from "./Utils.js";
import * as React       from "react";
import * as ReasonReact from "reason-react/lib/es6/src/reasonReact.js";

var component = ReasonReact.statelessComponent("GreetingTwo");

function make() {
  var newrecord = component.slice();
  newrecord[/* render */9] = (function () {
      return React.createElement("div", undefined, React.createElement("button", undefined, Utils.textEl("World!")));
    });
  return newrecord;
}

export {
  component ,
  make      ,
  
}
/* component Not a pure module */
github nwaywood / react-fullstack-template / lib / es6 / app / src / About / About.js View on Github external
// Generated by BUCKLESCRIPT VERSION 2.0.0, PLEASE EDIT WITH CARE
'use strict';

import * as Utils       from "../Utils.js";
import * as React       from "react";
import * as Logo        from "./logo.svg";
import * as ReasonReact from "reason-react/lib/es6/src/reasonReact.js";

var component = ReasonReact.statelessComponent("About");

function make() {
  var newrecord = component.slice();
  newrecord[/* render */9] = (function () {
      return React.createElement("div", undefined, React.createElement("div", undefined, Utils.textEl("About")), React.createElement("img", {
                      alt: "logo",
                      height: "80px",
                      src: Logo
                    }));
    });
  return newrecord;
}

var $$default = ReasonReact.wrapReasonForJs(component, (function () {
        return make(/* array */[]);
      }));
github nwaywood / react-fullstack-template / lib / es6 / app / src / HomeContainer / Home.js View on Github external
// Generated by BUCKLESCRIPT VERSION 2.0.0, PLEASE EDIT WITH CARE
'use strict';

import * as $$Array     from "bs-platform/lib/es6/array.js";
import * as Utils       from "../Utils.js";
import * as React       from "react";
import * as ReasonReact from "reason-react/lib/es6/src/reasonReact.js";

var component = ReasonReact.statelessComponent("Home");

function make(posts, _) {
  var newrecord = component.slice();
  newrecord[/* render */9] = (function () {
      var postElements = $$Array.map((function (post) {
              return React.createElement("li", {
                          key: post[/* title */0],
                          style: {
                            fontSize: "1.5em",
                            margin: "5px 0px"
                          }
                        }, Utils.textEl(post[/* title */0]));
            }), posts);
      return React.createElement("div", undefined, React.createElement("ul", undefined, postElements));
    });
  return newrecord;