All Projects → davidmarne → wui_builder

davidmarne / wui_builder

Licence: MIT license
A dart library for building user interfaces for the web, inspired by reactjs.

Programming Languages

dart
5743 projects
HTML
75241 projects

Projects that are alternatives of or similar to wui builder

Omi
Front End Cross-Frameworks Framework - 前端跨框架跨平台框架
Stars: ✭ 12,153 (+57771.43%)
Mutual labels:  virtual-dom
Preact Worker Demo
Demo of preact rendering an entire app in a Web Worker.
Stars: ✭ 204 (+871.43%)
Mutual labels:  virtual-dom
Gccx
Transforms CPX (JSX like syntax) into asm-dom Virtual DOM
Stars: ✭ 234 (+1014.29%)
Mutual labels:  virtual-dom
Amplesdk
Ample SDK - JavaScript UI Framework
Stars: ✭ 169 (+704.76%)
Mutual labels:  virtual-dom
Virtual Dom
The foundation of HTML and SVG in Elm.
Stars: ✭ 196 (+833.33%)
Mutual labels:  virtual-dom
Hydux
A light-weight type-safe Elm-like alternative for Redux ecosystem, inspired by hyperapp and Elmish
Stars: ✭ 216 (+928.57%)
Mutual labels:  virtual-dom
Miso
🍜 A tasty Haskell front-end framework
Stars: ✭ 1,911 (+9000%)
Mutual labels:  virtual-dom
Live
Live views and components for golang
Stars: ✭ 251 (+1095.24%)
Mutual labels:  virtual-dom
Svg Patterns
SVG patterns for Data Visualization.
Stars: ✭ 201 (+857.14%)
Mutual labels:  virtual-dom
Respo
A virtual DOM library built with ClojureScript, inspired by React and Reagent.
Stars: ✭ 230 (+995.24%)
Mutual labels:  virtual-dom
Val
VirtualDOM abstraction layer - give yourself better integration and full control over the DOM with any virtual DOM library that uses a Hyperscript-like API such as React and Preact.
Stars: ✭ 181 (+761.9%)
Mutual labels:  virtual-dom
Mithril.js
A JavaScript Framework for Building Brilliant Applications
Stars: ✭ 13,062 (+62100%)
Mutual labels:  virtual-dom
Asm Dom
A minimal WebAssembly virtual DOM to build C++ SPA (Single page applications)
Stars: ✭ 2,604 (+12300%)
Mutual labels:  virtual-dom
Squark
Rust frontend framework, for web browser and more.
Stars: ✭ 162 (+671.43%)
Mutual labels:  virtual-dom
Superviews.js
Template engine targeting incremental-dom
Stars: ✭ 242 (+1052.38%)
Mutual labels:  virtual-dom
Gantt
Gantt chart library using jsx support SVG, Canvas and SSR
Stars: ✭ 148 (+604.76%)
Mutual labels:  virtual-dom
Panel
Web Components + Virtual DOM: web standards for powerful UIs
Stars: ✭ 206 (+880.95%)
Mutual labels:  virtual-dom
SwiftElm
Reactive + Automaton + VTree in Swift, inspired by Elm.
Stars: ✭ 97 (+361.9%)
Mutual labels:  virtual-dom
Ng Vdom
(Developer Preview) A virtual-DOM extension for Angular, also work as React bridge.
Stars: ✭ 249 (+1085.71%)
Mutual labels:  virtual-dom
Ioing
Implement the solutions of performance improvement and componentization for your SPA (single page application) products with this Progressive Web App Development Engine.
Stars: ✭ 224 (+966.67%)
Mutual labels:  virtual-dom

A dart library for building user interfaces for the web, inspired by reactjs

Pub

For building declarative, component based web user interfaces in dart.

Provides a rich library of typed virtual elements for svg & standard html.

Supports defining custom components with an interface similar to react. All of the same lifecycle methods are supported.

Built with async rendering in mind from the start.

Fully compliant with dart 2, strong mode, and the DDC.

Documentation and examples

Check out the documentation on github pages for an in depth look at the framework

What makes this virtual dom framework different?

It's written in dart. Plus:

Generated virtual dom elements

The generator is the most unique feature of wui_builder. The generator generates virtual dom element builder for each Element type definied in the dart html and svg packages. Each virtual dom element builder provides the same typed setters as its corresponding html/svg Element. This makes it easy to write resilient componenents.

Configurable Update Scheduling

Next, wui_builder supports iterative rendering to avoid blocking the main thread on large updates. Iterative updates only processes on idle callbacks, which means the rendering job & layout will be split across multiple frames. wui_builder gives power to the developer to decide when components should render. It allows the developer can decide if a component updates syncronously,on animation frame, or on and idle callback. Ideally, a component will either:

  • render on animation frame for high priority updates that must finish. updates from mulitiple components can be batch rendered on animation frames.
  • render on idle callbacks for low priority updates that can be split across frames.

However, syncronous updates are also allowed to run on demand, without waiting for an animation frame or idle callback.

Smart Update Batching

Finally, wui_builder prevents uneccessary updates when multiple updates to the same component are queued before any can process. For example, say I have a component that updates on animation frame using setStateOnAnimationFrame. If setStateOnAnimationFrame is called twice between frames the update process will only be run once while allowing both state setter functions to be executed.

Note, requestIdleCallback is not currently supported by all browsers and wui_builder does NOT include a polyfill at this time. Synchronous rendering still works on all browsers. See a compatability chart here.

Syntax

class HelloWorldProps {
    final String text;
    HelloWorldProps(this.text);
}

class HelloWorld extends PComponent<HelloWorldProps> {
    HelloWorld(String text) : super(HelloWorldProps(text));

    @override
    VNode render() => VDivElement()
        ..text = props.text;
}

// instantiate the component, pass it an instance of HelloWorldProps
final component = HelloWorld('Hello world');

// render the virtual element into a container
render(component, querySelector('#container'));

Check out the documentation on github pages for more in depth examples.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].