@b9g/crank 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/crank.cjs +6 -3
- package/crank.cjs.map +1 -1
- package/crank.d.ts +7 -7
- package/crank.js +6 -3
- package/crank.js.map +1 -1
- package/dom.cjs +3 -4
- package/dom.cjs.map +1 -1
- package/dom.js +3 -4
- package/dom.js.map +1 -1
- package/package.json +10 -2
- package/umd.js +9 -7
- package/umd.js.map +1 -1
package/crank.cjs
CHANGED
|
@@ -659,7 +659,10 @@ function updateHost(renderer, root, ctx, scope, ret, oldProps, hydrationData) {
|
|
|
659
659
|
}
|
|
660
660
|
function commitHost(renderer, scope, ret, childValues, oldProps, hydrationValue) {
|
|
661
661
|
const tag = ret.el.tag;
|
|
662
|
-
let value =
|
|
662
|
+
let value = ret.value;
|
|
663
|
+
if (hydrationValue != null) {
|
|
664
|
+
value = ret.value = hydrationValue;
|
|
665
|
+
}
|
|
663
666
|
let props = ret.el.props;
|
|
664
667
|
let copied;
|
|
665
668
|
if (tag !== Portal) {
|
|
@@ -859,8 +862,8 @@ const _ContextImpl = Symbol.for("crank.ContextImpl");
|
|
|
859
862
|
* element tree are connected via contexts. Components can use this tree to
|
|
860
863
|
* communicate data upwards via events and downwards via provisions.
|
|
861
864
|
*
|
|
862
|
-
* @template [
|
|
863
|
-
* component. Used to strongly type the Context iterator methods.
|
|
865
|
+
* @template [T=*] - The expected shape of the props passed to the component,
|
|
866
|
+
* or a component function. Used to strongly type the Context iterator methods.
|
|
864
867
|
* @template [TResult=*] - The readable element value type. It is used in
|
|
865
868
|
* places such as the return value of refresh and the argument passed to
|
|
866
869
|
* schedule and cleanup callbacks.
|