README
X-View
A JavaScript library like React, but uses Web Components.
Requirements
Supports / Polyfills for:
Object.assign
WeakMap
Custom Elements
Shadow DOM
Installation
$ npm install --save x-view
Documentations
Example
<x-button></x-button>
var x = require("x-view");
var Button = x.createClass({
render: function() {
return x.createElement("button", {
type: "button"
}, ["Hello!"]);
}
});
x.register("x-button", Button);
JSX
/** @jsx x.jsx */
var vtree = (<div class="box">
<x-button />
</div>);
Output:
/** @jsx x.jsx */
"use strict";
var vtree = x.jsx(
"div",
{ "class": "box" },
x.jsx("x-button", null)
);
Built-in Tags
<x-raw html="..."></x-raw>
License
MIT License