Releases: beforesemicolon/markup
Releases · beforesemicolon/markup
Release 1.0.0
🎉🎊🍾
Markup finally V1 with a lot of simplification and improvements.
const [count, setCount] = state(0);
const incCount = () => setCount(prev => prev + 1);
const decCount = () => setCount(prev => prev - 1);
const temp = html`
<p>Count:${count}</p>
<button type="button" onclick="${incCount}">+</button>
<button type="button" onclick="${decCount}">-</button>
`;
temp.render(document.body);
New Stuff
- Now you create side effects for your state, and it supports a return value of any type for tracking and caching
- Support for object attribute
<button ${attrs} >...</button>
which allows for dynamic attribute setting - introduces
onMove
lifecycle for when the template is moved - introduces parentNode property
- introduces the
insertAfter
method as a way to render the template - create docs website from .md files
- introduces the @beforesemicolon/router
Improvements
- auto detect state usage and automatically handle template
- state only broadcasts when values change
- state updates are batched
- optimize render and DOM elements creation where needed
- calling lifecycles multiple times will no longer keep all callback functions. only the last one will be used
- improves performance and internal logic with cached templates, easy cleanups, badged state updates, and more
- extend repeat to accept Set, Map, and object literals
- update builder to use @bfs/builder
- improve@bfs/WebComponent packages with new Markup
- improves
suspense
to run with template rendering instead of on definition
Deprecated
- deprecates helper and Helper. Now you can just create functions that use state inside and they will be reactive by default.
- deprecates attr prefix and dotted attributes, e.g:
class.active="..."
,style.primary="..."
as now these can dynamically be set with injected function values - deprecates
onDestroy
. it can be provided as the return value ofonMount
method - changes event listeners options syntax from
<div onclick="${fn}, ${opt}" />
to<div onclick="${[fn, opt]}" />
- renamed
nodes
property tochildNodes
What's Changed
- Bump the npm_and_yarn group across 1 directories with 1 update by @dependabot in #12
- Next by @ECorreia45 in #14
- Update documentation.scss by @ECorreia45 in #15
- Bump the npm_and_yarn group across 1 directory with 2 updates by @dependabot in #19
- Release 1.0.0 by @ECorreia45 in #17
Full Changelog: 0.15.0...1.0.0
0.18.0
What's Changed
- restrict
unmount
for only mounted components - Removes the need to use the
attr.
prefix in more scenarios. Nowattr.
is only needed when you don't have piped conditions - fixes setting and removing empty class error
- improve attr handling in general
- Bump the npm_and_yarn group across 1 directories with 1 update by @dependabot in #12
- Next by @ECorreia45 in #13
- deprecate the "executable" concept for the "dynamic value" concept instead.
- increase test coverage
- reduce client bundle size
- remove the cached nodes when unmounted. Un-mounting clears all and mounting set all up again
- simplify internal logics
Fix bugs related to:
- tracking templates when using deeply conditionally nested templates
- rendered nodes, causing the template to have an inaccurate track of currently rendered nodes
Full Changelog: 0.15.0...0.18.0
Release 0.15.0
- Further removes the need to specify the
attr.
prefix for conditional attributes - Fixes internal issues and improve attribute handling in general
Release 0.14.1
New template lifycycles onMount
, onDestroy
, and updated onUpdate
Check Docs
What's Changed
- Bump semver from 6.3.0 to 6.3.1 by @dependabot in #1
- make the attr. optional by @ECorreia45 in #7
- Release 1.14.1 by @ECorreia45 in #10
New Contributors
- @dependabot made their first contribution in #1
Full Changelog: https://github.com/beforesemicolon/markup/commits/0.14.1