VanX 0.6.0: vanX.noreactive
- exemption from reactivity conversion
#311
Replies: 3 comments 2 replies
-
Awesome, thank you! Maybe a future feature, would it make sense if this was auto detected/applied if the field is not able to be reactive? |
Beta Was this translation helpful? Give feedback.
-
VanX Size change:
|
Beta Was this translation helpful? Give feedback.
-
VanX There is no change to the actual implementation. |
Beta Was this translation helpful? Give feedback.
-
Hi fellow VanJSers,
I'm happy to announce the release of VanX
0.6.0
. 🎉🎉🎉This release adds a new top-level function
vanX.noreactive
.vanX.noreactive
is used while constructing the reactive objects to exempt certain fields from being converted into reactive objects. For instance, if we have an application with a reactive array like:The
ArrayBuffer
s indata
will be treated as primitive fields without being converted into reactive objects. This feature is essential as the objects of certain native or 3rd party classes can't be correctly converted into reactive objects.ArrayBuffer
is one of such classes as wrapping it around a Proxy will cause problems (e.g.: #310).With this new function, the bundle size of VanX increases slightly. Gzipped bundle increases to
1150 bytes
(1.1kB) from1130 bytes
(1.1kB) (20 bytes
increase), while minified bundle increases to2197 bytes
(2.1kB) from2150 bytes
(2.1kB) (47 bytes
increase) - still being an ultra-lightweight extension to VanJS.❤️ Hope you can enjoy!
Beta Was this translation helpful? Give feedback.
All reactions