Comments (4)
Please provide a reproduction showing more specifically what is being mutated.
from jsx-vue2.
Ok! Here you are: https://codepan.net/gist/8336b69647780baba348ca380c83be59
As you can see, if two elements share a data object, the first jsx element seems to remove the prop field from the data object when it uses it.
from jsx-vue2.
This actually is a behavior in Vue core, where attrs that are extracted as props by the child component are being removed from the hash.
This is indeed a non-optimal implementation (we will keep this in mind for core), but in your case, you should be using props
instead of attrs
which works as intended.
from jsx-vue2.
Right, props
does seem like the better option, now that you mention it. Still seems like there would be instances where you might want to use this technique to iteratively distribute attributes as well as props. But yes, my specifc case is remedied by using props
instead, so I'm good.
from jsx-vue2.
Related Issues (20)
- Error in binding keyboard
- To give a ref to the JSX Element but I cannot get it by $refs. why?
- Include License File
- Vue 2.7 compatibility HOT 6
- 无法在vue2.7的setup中使用jsx HOT 17
- 无法在vue2.7的中使用ref获取dom,以及组件实例。 HOT 4
- scoped css not working with compositionAPI enabled and functional component using render HOT 1
- 迁移composition-api过程中无法兼容method和setup的injectH
- 创建的jsx文件导入到另一jsx中,导出小写不提示,大写提示非jsx HOT 1
- jsx 无法监听鼠标移入移除事件
- 两个preset都使用“sugar-inject-h”这个插件导致duplicate declaration h HOT 1
- 我用 map return 一组 tag div, 每个 div 中再用 ref 标记一个组件,最后得到的是一个 object, 我希望的到的是数组 HOT 3
- web component slot not work
- i want to know that how to use v-slot instead slot directive in jsx-vue2 HOT 4
- v-model compile error on playgroud
- bug:显式import render函数时不应该将其转化为h() , 请在转换时判断是否在vue组件的上下文中,或者是否是vue格式文件
- Modifiers _capture doesn't work with el-col of ElementUi HOT 2
- Cannot parse a prop that starts with _
- 在 Rspack 中无法正常工作
- 在vue2.7.16中使用@vue/babel-sugar-functional-vue,无法转换functional组件
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsx-vue2.