Socket
Book a DemoInstallSign in
Socket

decca

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decca

Render interfaces using pure functions and virtual DOM, kinda

2.3.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

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

Keywords

deku

FAQs

Package last updated on 07 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.