All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix when root node becomes a new tag (#38)
- Don't
console.warn
on existing tags. You should have full control over your tags.
- A mistake was made in the versioning, so these are re-releases of
0.0.28
. The changelog is kept for transparency.
- Falsy boolean values are now correctly removing attributes
- When setting attributes it now differs between assignment and
setAttribute
- Move to using
el.dataset
for attributes, instead ofattr()
attr
is deprecated and will be removed in the next major version
- Typed attributes via
Component<S, A>
, allows for typing viaattr<K extends keyof A>(name: K) => A[K] | undefined
- Rollback the support for nesting components with
mount
and tag functions, as it was not following the vision. Instead, you should use a regular function if you'd like to abstract away some logic.
- Add possibility to pass component directly to a tag, making nesting easier
- Fix
attr()
on attributes without a value
- Allow nested components with
mount
- Add typed
attr
viaattr<T = string>(name: string)
- Fix
Component
type to allow no defined state
- Add
attr
toview
andmounted
: Let's you query an attribute on the element
- Pass
el
toview
andmounted
- Remove unused
TentNodeList
type
- Allow a mix of text nodes and html nodes
- Check if a node have children before running nested diffs
- Use
!= null
instead of!foo
for stability
Children
now rightfully acceptsCustomNode
- E.g. you can now, without Typescript complaining, nest nodes:
p(span('my cool span'))
- E.g. you can now, without Typescript complaining, nest nodes:
- Add ES module build target
- The root node of a component is now also updated #29
- Nested assignments will now trigger re-renders #28
- Export
createTag
for creating custom tags, as well asComponent
,Children
andContext
types
- Children can be a number. A number will be converted to string with
.toString()
state
is now optional onComponent<S>
- Ability to type
state
- Remove
.parcel-cache
onnpm run build
- Add attributes recursively when cloning elements
- Remove unpkg link from README
- Set
license
in package.json toMIT
- Added
CHANGELOG.md
- Set/remove
boolean
attributes instead ofdisabled="true"
/disabled="false"
- Rename
createElement
tocreateTag
- Rename variables in
walker()
to make a bit more sense - Remove some tags and only keep the most used ones