Git Product home page Git Product logo

voe's Introduction

voe logo

Voe npm-v

🎃 Double thread javascript framework has the same API with Vue3.

Introduction

voe (发音 /vəʊ/) 的双线程是小程序的底层架构,它通过 web-worker 隔离 web 环境,屏蔽 dom 能力,从而做到绝对的控制力

顺便实现了 vue3 的响应式,依赖收集,状态更新等,但本质不同

Use

import { h, app, reactive } from "..";

app({
  setup() {
    const count = reactive(0)
    return () => (
      <main>
        {count}
        <button onClick={() => count++}>+</button>
      </main>
    )
  }
})

p.s.

由于用户代码都在 worker 中运行,所以 document、window、cookie、fetch,localstorage 等都不能用

但是可以使用 xhr 和 indexDB,双线程的目的就在于此,不是不让用,而是真的没得用

voe's People

Contributors

yisar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.