-
Beta Was this translation helpful? Give feedback.
Answered by
Tao-VanJS
Apr 26, 2024
Replies: 3 comments
-
https://vanjs.org/x#caveat-native-reactivity |
Beta Was this translation helpful? Give feedback.
0 replies
-
I just released VanX const {div} = van.tags
const data = vanX.reactive([
vanX.noreactive(new ArrayBuffer(8)),
vanX.noreactive(new ArrayBuffer(16)),
])
const App = () => div(
vanX.list(div, data, v => div(v.val.byteLength)),
div(button({onclick: () => data.push(vanX.noreactive(new ArrayBuffer(24)))}, "Push")),
)
van.add(document.body, App()) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Tao-VanJS
-
vanX.replace(versions.list, [])
const versionsData = await getVersionsData()
for (const v of versionsData) {
versions.list.push(
vanX.reactive({
recordId: v.recordId,
dateCreated: v.dateCreated,
imgBuffer: vanX.noreactive(v.imgBuffer),
})
)
} 0.6.0 works! Thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
I just released VanX
0.6.0
(#311), which adds a new functionvanX.noreactive
to exempt certain fields from reactivity conversion. With the new function, the following code can work properly in VanX0.6.0
: