Coder Social home page Coder Social logo

vue3's Introduction

monorepo 在创建虚拟dom的时候,根据dom中的内容会不会发生变化,添加静态标记 优化了diff比较,新增了静态标记

hoistStatic静态提升 vue2中不管元素有没有参与更新,在再次更新的时候仍然会被重新创建 vue3针对那些没有参与更新的元素,只在第一次的时候创建,后面更新的时候,直接复用,不会重新创建

事件侦听器缓存cacheHandlers 默认情况下,onClick会被视为动态绑定,每次更新都会去追踪它的变化 但是因为是同一个函数,不用再次追踪变化,直接缓存起来使用即可

vue2.xx版本在线编译 vue3.xx版本在线编译

vite创建项目

npm i -g create-vite-app
create-vite-app projectName
npm i
npm run dev

setup是组合api的入口函数

let count = ref(0) 在组合api中定义的变量、方法,要想在外部可以使用,需要使用return {}暴露出去

vue3's People

Contributors

robin-lei avatar

Watchers

James Cloos avatar  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.