All Projects → Marcisbee → Radi

Marcisbee / Radi

Licence: mit
🌀Tiny (in size) front-end framework with no extra browser re-flows

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Radi

Sinuous
🧬 Light, fast, reactive UI library
Stars: ✭ 740 (-21.78%)
Mutual labels:  dom
Drab
Remote controlled frontend framework for Phoenix.
Stars: ✭ 833 (-11.95%)
Mutual labels:  dom
Waff Query
Lightweight DOM manager
Stars: ✭ 9 (-99.05%)
Mutual labels:  dom
Js Leakage Patterns
🎯这是关于JavaScript内存泄露和CSS优化相关序列文章,相信你读完会有所收获的✈️
Stars: ✭ 756 (-20.08%)
Mutual labels:  dom
Choo
🚂🚋 - sturdy 4kb frontend framework
Stars: ✭ 6,637 (+601.59%)
Mutual labels:  dom
Crab
JavaScript library for building user interfaces with Custom Elements, Shadow DOM and React like API
Stars: ✭ 22 (-97.67%)
Mutual labels:  dom
Arrive
Watch for DOM elements creation and removal
Stars: ✭ 703 (-25.69%)
Mutual labels:  dom
Preact
⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.
Stars: ✭ 30,527 (+3126.96%)
Mutual labels:  dom
Zeroclipboard
The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
Stars: ✭ 6,650 (+602.96%)
Mutual labels:  dom
Dompurify
DOMPurify - a DOM-only, super-fast, uber-tolerant XSS sanitizer for HTML, MathML and SVG. DOMPurify works with a secure default, but offers a lot of configurability and hooks. Demo:
Stars: ✭ 8,177 (+764.38%)
Mutual labels:  dom
Domtastic
Small, fast, and modular DOM and event library for modern browsers.
Stars: ✭ 763 (-19.34%)
Mutual labels:  dom
Slim.js
Fast & Robust Front-End Micro-framework based on modern standards
Stars: ✭ 789 (-16.6%)
Mutual labels:  dom
Html Map Element
Proposed spec for dynamic slippy maps in HTML: https://maps4html.github.io/HTML-Map-Element/spec/
Stars: ✭ 8 (-99.15%)
Mutual labels:  dom
Aight
JavaScript shims and shams for making IE8-9 behave reasonably
Stars: ✭ 755 (-20.19%)
Mutual labels:  dom
Html5 Php
An HTML5 parser and serializer for PHP.
Stars: ✭ 908 (-4.02%)
Mutual labels:  dom
Maquette
Pure and simple virtual DOM library
Stars: ✭ 729 (-22.94%)
Mutual labels:  dom
Dom4
Modern DOM functionalities for every browser
Stars: ✭ 903 (-4.55%)
Mutual labels:  dom
Multicaptchabot
The best bot for collecting cryptocurrency from freebitco.in, freedoge.co.in and freenem.com 🚀🌔
Stars: ✭ 27 (-97.15%)
Mutual labels:  dom
Easy Dom
EASYDOM-可能是最适合你的 DOM 课程
Stars: ✭ 21 (-97.78%)
Mutual labels:  dom
Html React Parser
📝 HTML to React parser.
Stars: ✭ 846 (-10.57%)
Mutual labels:  dom

Radi

Radi is a tiny javascript framework.

It's built quite differently from any other framework. It doesn't use any kind of diffing algorithm nor virtual dom which makes it really fast.

With Radi you can create any kind of single-page applications or more complex applications.

npm version npm downloads gzip bundle size radi workspace on slack

Installation

To install the stable version:

npm install --save radi

This assumes you are using npm as your package manager.

If you're not, you can access these files on unpkg, download them, or point your package manager to them.

Browser Compatibility

Radi.js currently is compatible with browsers that support at least ES5.

Ecosystem

Project Status Description
radi-router radi-router-status Single-page application routing
radi-fetch radi-fetch-status HTTP client for Radi.js

Documentation

Getting started guide

Here are just a few examples to work our appetite.

Hello World example

Lets create component using JSX, tho it's not mandatory we can just use hyperscript r('h1', 'Hello', this.sample, '!'). I'm using JSX for html familiarity and to showcase compatibility.

/** @jsx Radi.r **/

class Hello extends Radi.component {
  state() {
    return { sample: 'World' };
  }
  view() {
    return (
      <h1>Hello { this.state.sample } !</h1>
    )
  }
}

Radi.mount(<Hello />, document.body);

This example will mount h1 to body like so <body><h1>Hello World</h1></body>

Counter example (With Single File Component syntax)

This will be different as we'll need to update state and use actions. Only actions can change state and trigger changes in DOM. Also we'll be using our SFC syntax for *.radi files

Counter.radi

class {
  state = {
    count: 0
  }

  @action up() {
    return {
      count: this.state.count +1
    }
  }

  @action down() {
    return {
      count: this.state.count -1
    }
  }
}

<div>
  <h1>{ this.state.count }</h1>

  <button onclick={ () => this.down() } disabled={ this.state.count <= 0 }>-</button>

  <button onclick={ () => this.up() }>+</button>
</div>

Architecture

Radi fully renders page only once initially. After that listeners take control. They can listen for state changes in any Radi component. When change in state is caught, listener then re-renders only that part.

Other frameworks silently re-renders whole page over and over again, then apply changes. But radi only re-renders parts that link to changed state values.

To check out live repl and docs, visit radi.js.org.

Stay In Touch

License

MIT

Copyright (c) 2017-present, Marcis (Marcisbee) Bergmanis

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].