0.12.0: Polymorphic binding, SVG/AutoML support, readonly properties, performance optimizations, etc. #53
Replies: 4 comments
-
|
0.12.1 was just released. 0.12.1 is a minor release of VanJS. In this release, we support |
Beta Was this translation helpful? Give feedback.
-
|
0.12.2 was just released. 0.12.2 is a minor release of VanJS, here are the changes:
|
Beta Was this translation helpful? Give feedback.
-
|
0.12.3 was just released. 0.12.3 is a minor release of VanJS. In this release, we disallow As of 0.12.3, Supporting |
Beta Was this translation helpful? Give feedback.
-
|
0.12.4 was just released. 0.12.4 is a minor release. In this release, we fixed a typo in the comments of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi fellow VanJSers,
I'm happy to announce the release of VanJS
0.12.0. 🎉🎉🎉0.12.0is a major release, with the implementation of several long-waited features as well as some performance optimizations.1. Polymorphic binding
If you use VanJS to build reusable components, it's desirable for the users to specify both state and non-state property values while building the components. For instance, for a reusable
Buttoncomponent like that:it would be desirable for
Buttonto accept both staticcolorvalue andcolorstate. If the property value is being used as the property value of a DOM element, or as a child node, things can work out of the box. However, prior to this release, State-derived properties andvan.bindonly support state objects as dependencies, which means if thecolorproperty is used like that:you can only pass-in state objects for
colorproperty, as non-state objects won't work for State-derived properties. This release solves the issue by allowing both state and non-state property values being used as dependencies for State-derived properties andvan.bind. With this feature, you can build both static and dynamicButtoncomponents:Try on jsfiddle
2. SVG/MathML support
In this release, we introduce a new function
van.tagsNSto support the creation ofSVG,MathMLor other HTML elements withnamespaceURI. For instance, you can build a smiley face withSVGelements now:Try on jsfiddle
and also math formulas with
MathMLelements:Try on jsfiddle
Great thanks to @andrewgryan for providing the intial draft implementation of this feature.
3. Support readonly properties while creating HTML elements
Prior to this release, readonly properties of HTML elements (e.g.: the
listproperty of an<input>element) can't be set properly. This release solves the problem. Thus the code below will work now:Try on jsfiddle
4. Performance optimizations
In this release, we replace
forEachcall withfor (... of ...)loops for better performance. Meanwhile, we disable theterseroptimization forwrap_func_argsas the optimization is obsolete in newer browser versions.With all the added features and performance optimizations, the minimized bundle size increases slightly to
1.3kB(1365 bytes), while still holding the title of the smallest reactive UI framework in the world.❤️ Hope you can enjoy!
Beta Was this translation helpful? Give feedback.
All reactions