Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

decca

rstacruz79MIT2.3.0

Render interfaces using pure functions and virtual DOM, kinda

deku, dom, elm, functional, react, redux, virtual

readme

decca

Render UI via pure functions and virtual DOM

Decca allows you to compose DOM structures with reuseable Components in a functional way. It is a drop-in replacement for Deku, which takes much inspiration from React and other functional-style view libraries.

Status

Documentation →
Playground →

Installation

Decca is available via npm for Browserify and Webpack. (Don't use npm? Get the standalone build from brcdn.org.)

npm install --save --save-exact decca

Components

Components are mere functions or objects (not classes!) that at least implement a render() function. See components documentation for more information.

/* @jsx element */
import { dom, element } from 'decca'

function Message ({ props }) {
  return <div>Hello there, {props.name}</div>
}

// Render the app tree
const render = dom.createRenderer(document.body)
render(<Message name='Rico S.' />)

Try out Decca in codepen.io.

Usage

See the API reference and Deku's documentation. Also see a comparison with Deku.

Acknowledgements

Decca takes blatant inspiration from Deku by the amazing Anthony Short and friends.

Thanks

decca © 2015+, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz

changelog

[v2.3.0]

Apr 8, 2017

  • #327 - Update compatibility with SystemJS and JSPM. (@mikz)

v2.2.2

Aug 29, 2016

v2.2.1

Aug 12, 2016

  • Make the npm package slimmer by excluding docs; no functional changes.

v2.2.0

Aug 12, 2016

  • Pure (function-only) components are now supported.

v2.1.0

Jun 1, 2016

  • #12 - Fix not being able to use camelCase properties (like accessKey). (#130, @mikz)

v2.0.1

Jan 16, 2016

  • Fix string rendering inserting random commas.

v2.0.0

Jan 10, 2016

  • Removes state, setState and initialState - making decca fully 1:1 analogous to Deku v2.0.0-rc11 API. For states, use deku-stateful.

v1.2.1

Jan 8, 2016

  • More optimizations.

v1.2.0

Jan 8, 2016

  • Some minor optimizations to make rendering faster between passes.

v1.0.0

Jan 1, 2016

  • Renamed from 'not-deku' to 'decca'. No functional changes since v0.1.0.

v0.1.0

Jan 1, 2016

  • Many changes... but we're now Deku v2 compliant.

v0.0.1

Dec 30, 2015

  • Initial release.