Skip to content

Commit 602e908

Browse files
committed
merge dev branch
2 parents e7a04bf + 6faacf4 commit 602e908

17 files changed

Lines changed: 2864 additions & 1737 deletions

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
[![Travis](https://travis-ci.org/Lucifier129/react-lite.svg?branch=master)](https://travis-ci.org/Lucifier129/react-lite)
44
[![npm](https://img.shields.io/npm/v/react-lite.svg)](https://www.npmjs.com/package/react-lite)
55
[![Join the chat at https://gitter.im/Lucifier129/react-lite](https://badges.gitter.im/Lucifier129/react-lite.svg)](https://gitter.im/Lucifier129/react-lite?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6-
[![File Size](https://badge-size.herokuapp.com/Lucifier129/react-lite/master/dist/react-lite.min.js.svg)](https://raw.githubusercontent.com/Lucifier129/react-lite/master/dist/react-lite.min.js)
76

87
## Introduction
9-
React under 20k.
108
react-lite is an implementation of React that optimizes for small script size.
119
### Framework Size Comparison
1210

@@ -18,7 +16,7 @@ react-lite is an implementation of React that optimizes for small script size.
1816
| React | 0.14.3 | 136.0kb |
1917
| Web Components Polyfill| 0.7.19 | 118.0kb |
2018
| Riot | 2.3.11 | 20kb |
21-
| React-lite | 0.15.6 | 20kb |
19+
| React-lite | 0.15.6 | 25kb |
2220

2321
React-lite supports the core APIs of React, such as Virtual DOM, intended as a drop-in
2422
replacement for React, when you don't need server-side rendering in browser(no `React.renderToString` & `React.renderToStaticMarkup`).
@@ -77,14 +75,11 @@ just the same as what react does, see some demos below(I just add the alias to w
7775
## React-lite vs React
7876

7977
via react-lite:
80-
- In browser, virtual-dom can not render to string(no `React.renderToString` and `React.renderToStaticMarkup`)
8178
- all of React.PropTypes method is no-op(empty function)
8279
- use React in server side rendering, and use React-lite in browser
8380
* react-lite will replace the dom tree with new dom tree
8481
* you had better avoid `script|head|link` tag in client side
8582
- can not use react-dev-tool inspect react-lite, should switch to regular react for debugging
86-
- handle props in a different way
87-
* react-lite simply `setAttribute` if `!(propName in elem)` returns true
8883

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

0 commit comments

Comments
 (0)