[IMP] reactivity: add support for collections (Set/Map WeakSet/WeakMap)

This commit is contained in:
Samuel Degueldre
2022-02-25 15:05:29 +01:00
committed by Géry Debongnie
parent 076b0d774e
commit d735213758
4 changed files with 747 additions and 64 deletions
@@ -28,6 +28,20 @@ exports[`reactivity in lifecycle can use a state hook 2 1`] = `
}"
`;
exports[`reactivity in lifecycle can use a state hook on Map 1`] = `
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
let block1 = createBlock(\`<div><block-text-0/></div>\`);
return function template(ctx, node, key = \\"\\") {
let txt1 = ctx['counter'].get('value');
return block1([txt1]);
}
}"
`;
exports[`reactivity in lifecycle change state while mounting component 1`] = `
"function anonymous(bdom, helpers
) {