- Notifications
You must be signed in to change notification settings - Fork2
kocisov/crab
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API.
This version of Crab was written in TypeScript to include Types for your development
import{Component,defineComponents,render}from'@kocisov/crab'exportdefaultclassHeaderextendsComponent{// or Polymer like => static get is()staticgetcomponentName(){return'header-component'}state={id:'Some string...',}changeState(){this.setState({id:uuid.v4(),})}render(){return` <div> Hello${this.state.id} </li> `}}defineComponents([Header,SmallButon],{crabug:true})render(` <header-component></header-component> `,` body { margin: 0; } `,document.getElementById('root'),)
This version ofCrab is compiling from ES2015+ to ES5 ready even without native-shim.
# yarnyarn add @kocisov/crab# npmnpm install --save @kocisov/crab
// webpack with babelimport{Component,defineComponents,render}from'@kocisov/crab'// ...render(` <view-layout></view-layout> `,document.getElementById('root'),)
Work in progress atdocs.
About
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.