🍦 VanJS: World's smallest reactive UI framework. Incredibly Powerful, Insanely Small - Everyone can build a useful UI app in an hour.
A minor release with changes to van.d.ts
to improve VanJS's type system:
((dom?: Node) => ValidChildDomValue) | ((dom?: Element) => Element)
.1.2.1
added specialized return types for tags of HTMLElement
type.See the release announcement: https://github.com/vanjs-org/van/discussions/120
van.hydrate
that allows us to hydrate a SSR component into a CSR component with added reactivity while preserving all the server-side states. Sample usage:van.hydrate(document.getElementById("basic-counter")!, dom => Counter({
van,
id: dom.id,
init: Number(dom.getAttribute("data-counter")),
}))
van-{VERSION}.debug.js
to allow string values in on...
properties of tag functions, if the properties are used to set HTML attributes (via setAttribute
) of the DOM element. This is crucial for cross-platform UI components to specify event handlers, as for SSR, only string-valued on...
event handlers can be visible in the rendered HTML strings. You can refer to https://vanjs.org/ssr#on-properties for a detailed explanation.van.d.ts
:
val
property to Primitive | null | undefined
(DOM-node-valued states are not allowed anymore). This is because DOM-node-valued states have problematic behavior and should be generally avoided, see https://vanjs.org/advanced#why-not-dom-valued-states for more information.(dom: Node | undefined) => ValidChildDomValue
(changed from (dom: Node) => ValidChildDomValue
), as it needs to handle to case where the dom
parameter is undefined
(when the binding function is invoked for the first time).Props
with built-in type Record
.See the release announcement: https://github.com/vanjs-org/van/discussions/114
1.1.3
is a minor release. Here are the changes:
van.d.ts
by using TypeScript built-in typesvan.debug.js
There is no change in the implementation of van.js
file.
Version 1.1.1
and 1.1.2
are skipped as the published NPM packages have some minor issues in van.d.ts
file.
See the release announcement: https://github.com/vanjs-org/van/discussions/81#discussioncomment-6849913
The garbage collection mechanism in VanJS was revamped in 1.1.0
. In this overhaul, we improved the GC handling for derived states and side effects registered inside DOM binding functions to avoid some unnecessary constraints while defining derived states and side effects.
See the release announcement: https://github.com/vanjs-org/van/discussions/81
1.0.2
is a minor release. This release contains an optimization to avoid the duplicate execution of Object.getPrototypeOf
in tag functions.
This optimization increases the bundle size slightly: the size of .min.js
is 1630 bytes (4 more bytes compared to 1.0.1
); and the size of .min.js.gz
is 928 bytes (2 more bytes compared to 1.0.1
).
See the release announcement: https://github.com/vanjs-org/van/discussions/72#discussioncomment-6718307
This is a minor release. In this release, we renamed a parameter to keep the style consistent in source file van.js
. There was no change in the actual implementation.
Thanks @Tolluset for the contribution!
See the release announcement: https://github.com/vanjs-org/van/discussions/72#discussioncomment-6652959
A major milestone with the commitment of API stability and forward compatibility for future releases.
van.derive
null
as a valid property value for tag functionspackage-lock.json
inspector (in 28 lines)See the release announcement: https://github.com/vanjs-org/van/discussions/72
See the release announcement: https://github.com/vanjs-org/van/discussions/53#discussioncomment-6463621
As of 0.12.3, null
is not supported as prop values in tag functions. Thus this release updates van.d.ts
file to keep it consistent.
Supporting null
as prop values in tag functions is a planned feature in 1.0.0 release. Thus the restriction will be removed in 1.0.0 release.
See the release announcement: https://github.com/vanjs-org/van/discussions/53#discussioncomment-6223903