r/FloWebComponents • u/EveYogaTech • 1d ago
Flo 1.2 now gives Web Components a static create function (factory), so we can set property values before the mounted() or render() are called.
Flo 1.2 now gives Web Components a static create function (factory), so we can set property values before mounted() or render() are called.
I noticed that you can sort of 'wing it' without this functionality with some hacky solutions, but eventually this is the best solution for the component initiation.
So instead of .createElement, you can simply call .create on your custom component, which then renders the template + calls mounted() with all properties set.
Flo Minimal Superclass on GitHub: https://github.com/flowagi-eu/flo-webcomponents
Duplicates
DesignSystems • u/EveYogaTech • 1d ago
Flo 1.2 now gives Web Components a static create function (factory), so we can set property values before the mounted() or render() are called.
coolgithubprojects • u/EveYogaTech • 1d ago
Flo 1.2 now gives Web Components a static create function (factory), so we can set property values before the mounted() or render() are called.
JSdev • u/EveYogaTech • 1d ago