User:Dntzhang/sandbox
Omi.js | |
---|---|
Original author(s) | dntzhang (张磊) |
Stable release | 5.0.4
|
Written in | JavaScript |
Platform | Cross-platform |
Size | 4 KB gzip |
Type | JavaScript framework |
License | MIT License |
Website | https://github.com/Tencent/omi |
What's Omi?
- Tiny size. _(**4kb** gzipped)_ - Supports TypeScript. - Reactive data-binding - Supports MVVM - Enhanced CSS, [rpx unit support](https://github.com/Tencent/omi/releases/tag/v4.0.26) base on **750** screen width - [Based on Shadow DOM](https://developers.google.com/web/fundamentals/web-components/shadowdom) - Easy to debug via [Omi DevTools Extension](https://github.com/f/omi-devtools) [[Install from Chrome WebStore](https://chrome.google.com/webstore/detail/omijs-devtools/pjgglfliglbhpcpalbpeloghnbceocmd)] - Compliance with browser trend and API design. - Merge [**Web Components**](https://developers.google.com/web/fundamentals/web-components/) and [**JSX**](https://reactjs.org/docs/introducing-jsx.html) into one framework. - Built in observe feature (No need to call `this.update()`). - Web Components can also be a data-driven view, **`UI = fn(data)`**. - JSX is the best development experience (code intelligent completion and tip) UI Expression with least [grammatical noise](https://github.com/facebook/jsx#why-not-template-literals) and it's turing complete(template engine is not, es template string is but grammatical noise is too loud). - The original **Path Updating** system. Proxy-based automatic **accurate** update, **low power consumption**, high degree of freedom, excellent performance, easy integration of `requestIdleCallback` - Say goodbye to `this.update` method when using **store system**! It will automatically update UI partially when data is changed. - Look at [Facebook React vs Web Components](https://softwareengineering.stackexchange.com/questions/225400/pros-and-cons-of-facebooks-react-vs-web-components-polymer),Omi **combines their advantages** and gives developers the **freedom to choose the way they like**. - **Shadow DOM merges with Virtual DOM**, Omi uses both virtual DOM and real Shadow DOM to make view updates more accurate and faster. - With a Store system, 99.9% of projects don't need time travel, and not only Redux can travel, please don't come up on Redux, Omi store system can meet all projects - **Scoped CSS**'s best solution is **Shadow DOM**, the community churning out frameworks and libraries for Scoped CSS (using JS or JSON writing styles such as Radium, jsxstyle, react-style; binding to webpack using generated unique `className` `filename-classname-hash`, such as CSS Modules, Vue), are hack technologies; _and Shadow DOM Style is the perfect solution_.