技术控

    今日:36| 主题:57635
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] Virtual dom it sucks

[复制链接]
精神病院VIP病人 投递于 2016-9-30 10:45:54
186 3
vomit

     v

      irtual d     om it      sucks      

Virtual dom it sucks

Virtual dom it sucks-1-技术控-expression,themselves,substitute,function,rainbow

  Intro

  Vomit is a simple function call that allows you to quickly build components that update themselves.
  1. var name = 'Nyan'
  2. var rainbow = ['red', 'orange', 'yellow', 'green', 'blue', 'purple']
  3. var el = vomit`<section>
  4.   <h1>${name} the cat!</h1>
  5.   <ul>
  6.     ${rainbow.map(color => vomit`<li>${color}</li>`)}
  7.   </ul>
  8. </section>`
复制代码
  Vomit does not force you into any syntax/API but instead uses the power of JavaScript template literals built in your browser. String substitution (expression between ${} ) presents many benefits and Vomit makes it even better allowing you to substitute Objects, Arrays, DOM Elements, Functions, Promises and even Streams .
  Other features are:
  
       
  • Component oriented development using DOM diffing based on real DOM (not virtual DOM)   
  • Separate and optimize rendering of static and dynamic content   
  • HTML5 Web Component   
  • Works server side   
  • Works with SVG   
  • 2kb minified + gzipped, ideal for mobile and to include as dependency   
  • share the same core engine than the MVVM librarybrick  
   You'll find Vomit disgustingly easy to learn. Please check outlive examples anddocs.
  Question

   For questions and feedback please use the Gitter chat room . For support, bug reports and or feature requests please use the issue list of this repo and make sure it's not present yet in ourreporting checklist.
  Contribution

   Vomit is an open source project and would not exist without its community. If you want to participate please make sure to read the contributing guide before making a pull request. If you have any vomit-related project, component or other let everyone know on ourchat room or in ourwiki.
  License

   

Virtual dom it sucks

Virtual dom it sucks-2-技术控-expression,themselves,substitute,function,rainbow

  The MIT License (MIT)
  Copyright (c) 2016 Olivier Wietrich
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



上一篇:数百个 HTML5 例子学习 HT 图形组件 – 3D 建模篇
下一篇:SQL Server Reporting Services Column Level Security
营养过剩不在胸 投递于 2016-9-30 12:04:31
比我有才的都没我帅,比我帅的都没我有才!  
回复 支持 反对

使用道具 举报

tywgv9trsf 投递于 2016-9-30 16:48:12
前排支持下
回复 支持 反对

使用道具 举报

KamorkisEl 投递于 2016-10-2 00:52:00
呵呵,低调,低调!
回复 支持 反对

使用道具 举报

我要投稿

推荐阅读


回页顶回复上一篇下一篇回列表
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 | 粤公网安备 44010402000842号 )

© 2001-2017 Comsenz Inc.

返回顶部 返回列表