NewebComponents
NewebComponents - framework, which has 2 goals:
- The real separating of the design and logic for user-interface.
- Reactive web-components without virtual dom, only with HTML5 DOM specification.
NewebComponents use pure HTML for templating, without data-binding, conditions, cycles and event-handlers.
NewebComponents use RxJs as engine for reactivity.
Install
npm install neweb-components --save
or
yarn add neweb-components
Usage
Simple example :: counter
;;;// Create new component;// Render into container #rootrenderview, document.getElementById"root" as HTMLElement;
Complex example
// index.ts
;;;// Bind components to real window-object by special class `Document`, for example, window can be from JSDOMComponent.setDocumentnew Document;// Instance of view;// Render into container #rootrenderview, document.getElementById"root" as HTMLElement;
// template.html
Counter:
// view.ts
;;;; ;
API
Test
npm install
npm test