Coder Social home page Coder Social logo

When JSX is used, v-slots cause child component does unnecessary rendering during parent component re-rendering about babel-plugin-jsx HOT 9 OPEN

yuwu9145 avatar yuwu9145 commented on August 24, 2024
When JSX is used, v-slots cause child component does unnecessary rendering during parent component re-rendering

from babel-plugin-jsx.

Comments (9)

TheInvoker avatar TheInvoker commented on August 24, 2024 2

+1 same for me, same boat

from babel-plugin-jsx.

uke5tar avatar uke5tar commented on August 24, 2024 1

Hi folks,
Is there an expected timeline for resolving this issue? I am waiting eagerly for a fix here because it affects the linked rendering of VTreeview in Vuetify quite significantly. No intend to pressure - just curious as it would affect my planning in a work-around. Thank you!

from babel-plugin-jsx.

Zheng-Changfu avatar Zheng-Changfu commented on August 24, 2024 1

Is there an expected repair time? I think this has a great impact on performance

from babel-plugin-jsx.

Zheng-Changfu avatar Zheng-Changfu commented on August 24, 2024 1

$stable:true解决了我们的性能问题,官方的使用方法是什么?

jsx 目前没有做这种编译处理, vue slot 有3种类型,stable、dynamic、forward,template 语法会在编译过程中根据上下文自动编译出插槽类型,从而在更新判断中做优化处理,而 jsx 没有做这种处理,所以会强制更新

vue 更新判断源码
vue slot types
vue 目前没办法做到插槽的依赖收集

from babel-plugin-jsx.

angrymarker avatar angrymarker commented on August 24, 2024

this is the last item I need updated to convert my project from vue2 to vue3, would love an ETA

from babel-plugin-jsx.

Zheng-Changfu avatar Zheng-Changfu commented on August 24, 2024

Setting $stable to true in v-slots prevents updates for subcomponents,I'm looking at this issue:#525

from babel-plugin-jsx.

Zheng-Changfu avatar Zheng-Changfu commented on August 24, 2024

v-slots={{
$stable:true
}}

from babel-plugin-jsx.

yuwu9145 avatar yuwu9145 commented on August 24, 2024

$stable:true resolves our performance issue, what's the official way of using it?

from babel-plugin-jsx.

Zheng-Changfu avatar Zheng-Changfu commented on August 24, 2024

$stable:true解决了我们的性能问题,官方的使用方法是什么?

jsx 目前没有做这种编译处理, vue slot 有3种类型,stable、dynamic、forward,template 语法会在编译过程中根据上下文自动编译出插槽类型,从而在更新判断中做优化处理,而 jsx 没有做这种处理,所以会强制更新

vue 更新判断源码 vue slot types vue 目前没办法做到插槽的依赖收集

stable 才会在更新过程中做优化,dynamic 会强制更新,forward 会根据运行时的行为决定

from babel-plugin-jsx.

Related Issues (20)

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.