Changelog
15.2.0
Fix of small problem in router.
ctxClass now have to inherit from BobrilCtx and call its super constructor. But adding disposables in such constructor works again.
components without ctxClass have their ctx instance of BobrilCtx instead of plain object.
Changelog
15.1.0
Router URLs now does not have last slash when optional parameter is not defined.
Component now inherit from BobrilCtx which save some bytes from bundle.
Changelog
15.0.0
Breaking change - string styles are not anymore supported { tag: 'div', style: 'color: red' }
use objects instead.
Subtle breaking change/optimization - when tsx components render returns Fragment then it is inlined in vdom.
Cleaned up repository from old non npm version. Port old tests.
New dynamic styles feature allowing very efficient update of element inline styles and classes.
<div
style={() => {
let s = b.useState(0);
s((s() + 1) % 101);
return { opacity: s() * 0.01 };
}}
>
Pulsing
</div>
Tsx components can skip component update by returning constant b.skipRender
.
function SkipHello(data: { input: string }) {
if (data.input == "skip") return b.skipRender;
return <Hello input={data.input}></Hello>;
}
Key down up events have key
property (same meaning as KeyboardEvent.key
) and is normalized on IE11 and Firefox.
New polyfills for IE11: new Set(array)
, new Map(array)
Router injectParams
function is exported.
Changelog
14.18.0
Improved anchor
and added Anchor
TSX component. (Contrib by https://github.com/keeema)
Changelog
14.16.0
Changed useEffect
body to be executed inside update frame. Before this change it was run asynchronously after frame using b.asap
. This converts useEffect
into another lifecycle method after postUpdateDom
. Difference is that postUpdateDom
(useLayoutEffect
) can trigger another synchronous Render
, but useEffect
is executed always only once as last. Calling deferSyncUpdate
from useEffect
body does not have any effect.