Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(renderList): handle readonly reactive arrays in renderList #13090

Closed

Conversation

linzhe141
Copy link
Contributor

@linzhe141 linzhe141 commented Mar 23, 2025

close #13087

In version 3.4 the runtime will throw a warning and the "array item" will not be modified, so this should be a bug

Copy link

github-actions bot commented Mar 23, 2025

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB (+8 B) 38.1 kB (+3 B) 34.4 kB (+33 B)
vue.global.prod.js 158 kB (+8 B) 58 kB (+3 B) 51.6 kB (+69 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 46.5 kB 18.2 kB 16.7 kB
createApp 54.5 kB 21.3 kB 19.5 kB
createSSRApp 58.7 kB 23 kB 21 kB
defineCustomElement 59.4 kB 22.9 kB 20.8 kB
overall 68.6 kB 26.4 kB 24 kB

Copy link

pkg-pr-new bot commented Mar 23, 2025

Open in Stackblitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@13090

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@13090

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@13090

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@13090

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@13090

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@13090

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@13090

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@13090

@vue/shared

npm i https://pkg.pr.new/@vue/shared@13090

vue

npm i https://pkg.pr.new/vue@13090

@vue/compat

npm i https://pkg.pr.new/@vue/compat@13090

commit: 3d2302b

@linzhe141 linzhe141 closed this Mar 24, 2025
@edison1105
Copy link
Member

edison1105 commented Mar 24, 2025

We cannot skip source = shallowReadArray(source), which will cause performance degradation.
I prefer #13091

@linzhe141 linzhe141 deleted the fix-renderList-with-readonly-ref-array branch March 24, 2025 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Readonly reference to an array is not honored when inside v-for
2 participants