All Projects → Lucifier129 → React Lite

Lucifier129 / React Lite

Licence: mit
An implementation of React v15.x that optimizes for small script size

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Lite

Sam
SAM: Sharpness-Aware Minimization (PyTorch)
Stars: ✭ 322 (-81.43%)
Mutual labels:  optimizer
Stacer
Linux System Optimizer and Monitoring - https://oguzhaninan.github.io/Stacer-Web
Stars: ✭ 7,405 (+327.05%)
Mutual labels:  optimizer
Adahessian
ADAHESSIAN: An Adaptive Second Order Optimizer for Machine Learning
Stars: ✭ 114 (-93.43%)
Mutual labels:  optimizer
Scour
Scour - An SVG Optimizer / Cleaner
Stars: ✭ 443 (-74.45%)
Mutual labels:  optimizer
Avmf
🔩 Framework and Java implementation of the Alternating Variable Method
Stars: ✭ 16 (-99.08%)
Mutual labels:  optimizer
Gpx Simplify Optimizer
Free Tracks Optimizer Online Service
Stars: ✭ 61 (-96.48%)
Mutual labels:  optimizer
Adamp
AdamP: Slowing Down the Slowdown for Momentum Optimizers on Scale-invariant Weights (ICLR 2021)
Stars: ✭ 306 (-82.35%)
Mutual labels:  optimizer
Lookahead pytorch
pytorch implement of Lookahead Optimizer
Stars: ✭ 138 (-92.04%)
Mutual labels:  optimizer
Giflossy
Merged into Gifsicle!
Stars: ✭ 937 (-45.96%)
Mutual labels:  optimizer
Glsl Optimizer
GLSL optimizer based on Mesa's GLSL compiler. Used to be used in Unity for mobile shader optimization.
Stars: ✭ 1,506 (-13.15%)
Mutual labels:  optimizer
Leanify
lightweight lossless file minifier/optimizer
Stars: ✭ 694 (-59.98%)
Mutual labels:  optimizer
Marsnake
System Optimizer and Monitoring, Security Auditing, Vulnerability scanner for Linux, macOS, and UNIX-based systems
Stars: ✭ 16 (-99.08%)
Mutual labels:  optimizer
Viz torch optim
Videos of deep learning optimizers moving on 3D problem-landscapes
Stars: ✭ 86 (-95.04%)
Mutual labels:  optimizer
Heimer
Heimer is a simple cross-platform mind map, diagram, and note-taking tool written in Qt.
Stars: ✭ 380 (-78.09%)
Mutual labels:  optimizer
Keras Adabound
Keras implementation of AdaBound
Stars: ✭ 129 (-92.56%)
Mutual labels:  optimizer
Booster
🚀Optimizer for mobile applications
Stars: ✭ 3,741 (+115.74%)
Mutual labels:  optimizer
Jhc Components
JHC Haskell compiler split into reusable components
Stars: ✭ 55 (-96.83%)
Mutual labels:  optimizer
Nn dataflow
Explore the energy-efficient dataflow scheduling for neural networks.
Stars: ✭ 141 (-91.87%)
Mutual labels:  optimizer
Image Optimize Command
Easily optimize images using WP CLI
Stars: ✭ 138 (-92.04%)
Mutual labels:  optimizer
Adamw keras
AdamW optimizer for Keras
Stars: ✭ 106 (-93.89%)
Mutual labels:  optimizer

react-lite

Travis npm Join the chat at https://gitter.im/Lucifier129/react-lite

Introduction

react-lite is an implementation of React that optimizes for small script size.

Note: react-lite dose not support React v16.x now.

Size Comparison

Framework Version Minified Size
Ember 2.2.0 446kb
Polymer 1.0.6 183kb
Angular 1.4.8 148kb
React 0.14.3 136kb
Web Components Polyfill 0.7.19 118kb
Riot 2.3.11 20kb
React-lite 0.15.6 25kb
preact + preact-compat 8.2.1 5kb

React-lite supports the core APIs of React, such as Virtual DOM, intended as a drop-in replacement for React, when you don't need server-side rendering in browser(no ReactDOM.renderToString & ReactDOM.renderToStaticMarkup).

Usage

If you are using webpack, it's so easy to use react-lite, just config alias in webpack.config.js:

// webpack.config.js
{
    resolve: {
        alias: {
            'react': 'react-lite',
            'react-dom': 'react-lite'
        }
    }
}

Note: feel free to try react-lite, if something happen and we can't fix it in time, then use regular react instead.

Installation

You can install react-lite from npm:

npm install react-lite --save

Browser compatibility

supports IE9+ / ES5 enviroment

Documentation

learn react-lite from React official documentation

What can react-lite do?

just the same as what react does, see some demos below(I just add the alias to webpack.config.js, no need to do anything else):

React-lite vs React

via react-lite:

  • all of React.PropTypes method is no-op(empty function)
  • use React in server side rendering, and use React-lite in browser
    • react-lite will replace the dom tree with new dom tree
    • you had better avoid script|head|link tag in client side
  • can not use react-dev-tool inspect react-lite, should switch to regular react for debugging
  • react-lite only works with a JSX toolchain(issue)
  • unlike react, event object in react-lite is always persistent, and event.persist is set as no-op to avoid throwing error.
  • react-lite can't work with react-tap-event-plugin, please use fastclick instead. or add alias 'react-tap-event-plugin': 'react-lite/lib/react-tap-event-plugin', just like here
  • can't work with transform-react-inline-elements, you will get a bundle include both react and react-lite.
  • react-lite just follow the best practice of React.

Test

react-lite reuses react's unitest(170), you can see them in __test__, and run the tests with:

npm test

License: MIT (See LICENSE file for details)

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