Releases: tamb/domponent
Dependency Bump 2.0.2
Hiccup Fix-up
I wrote an npm script to run tests and build before publish because.... well I didn't build before the 2.0.0 publish. So 2.0.0 is deprecated officially. Sorry about that. But the fix was fast.
Additional tests were written for Exponent class.
Integration tests to come and updated benchmarks will come soon too!
Prod ready for v2
Watchers, more lifecycle hooks, and input binding!
Heck yes!
Let's roll!
Watcher Execution Update
the post watch method now fire after DOM updates!
Props now can have watchers
Please do not name your props and state fields the same. That would be stupid. Also it would mess up watchers, which are now for both state and props fields so Exponents and Components can now isolate logic
v2 Alpha! Watch out!
Version 2 has breaking changes.
refs are now placed inside of a $refs object. This helps clean up the component fields.
We now how watchers (similar to VueJS) for individual state fields.
Only a slightly larger size. We went from a little over 5kb to 6kb. But the added feature of watchers and the cleanliness of $refs should come as great news!
This is only alpha. A bunch of tests are coming before we reach a RC. These features are subject to change.
Custom Syntax
A new feature has been added! You can optionally customize the syntax you use in your HTML.
The following items can be customized.
INHERITS_FROM: '<-',
FROM_COMPONENT: '.',
KEY_VALUE: ':',
MULTIPLE_VALUES: "|",
METHOD_CALL: "->",
LIST: ","This means that in your config you can add:
{
customSyntax: {
LIST: "!",
METHOD_CALL: "#"
}
}And your HTML can use this!
Scope-fully This Helps
I've fixed the query selector for ref and ref-array so there should be 0 leaks of non-component elements into the current components.
It was a simple fix for a bug that had some larger memory issues!
This is a huge win!
Optional Initial Components
You can now create a Domponent app instance without any components and add them all later! It's a feature, not a bug! Lol :\
But this is a good thing.
new Init(
{
selector: element
}
)No need to initialize with a components field!
Total Init Exposure!
The Init function now exposes createdComponents and components fields, which contains the component instances and component definitions respectively.