Micro react-like, redux-compatible, plain JS library for event-driven ui components
Features
- virtual DOM
- react-like
- jsx compatible
- minimal
- standard
- pure ES2015
Installation
$ npm i --save blocksjs
Examples
A simple component
const hello = { return }
A simple component (jsx enabled)
Enable jsx
npm i --save-dev babel-plugin-transform-jsx
.babelrc
{ return <span> Hello name! </span> }
A component with lifecycle callbacks
{ this } { this } { return }
A slightly complex counter
Check out a live exmaple (hit Run with JS
)
const ARROW_KEYS = UP: 38 DOWN: 40 const button = const counter = const headsOrTails = Math < 5 { document thisstateinterval = } { thisstateinterval = } { this } { this } { return ? this : this } { return }