react-primitate
v1.8.1
Published
Connect Primitate and React
Downloads
32
Readme
React-Primitate
React-Primitate is an official addon for the Primitate to connect Primitate and React.
Install
npm install react-primitate
Example
const { createElement } = require("react");
const { Primitate } = require("primitate");
const { PrimitateComponent } = require("react-primitate");
const Counter = Primitate(0);
const Counter_Comp = PrimitateComponent(
Counter,
count => (
createElement("div", null
, createElement("p", null, count)
)
));
// Counter_Comp is a Ract.ComponentClass so you can use like
// <Counter_Comp/> or React.createElement(Counter_Comp)
LICENSE
MIT