vcom

6.0.13 • Public • Published

vcom

Everything you need to create functional, virtual Preact Components with CSS, HTML, and JS.

Note: if you want to use this standalone, please use dist/vcom.js. Otherwise you'll want to use babel with es2015 or buble to transpile this in your application, either as a global transform or after the build step.

Example

/**
 * Modules
 */
 
const { HTML, CSS, render } = require('./dist/vcom.js')
 
/**
 * Styles
 */
 
const css = CSS(`
  .box {
    text-align: center;
    font-size: 10rem;
    background: blue;
    padding: 50px;
    color: white;
  }
`)
 
/**
 * HTML
 */
 
const { div } = HTML
 
/**
 * Render
 */
 
const App = (props) => (
  div.class('box')('welcome')
)
 
/**
 * Render to DOM
 */
 
render(css(App), document.body)

Installation

npm install vcom

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i vcom

Weekly Downloads

96

Version

6.0.13

License

none

Last publish

Collaborators

  • mattmueller