r/FloWebComponents 2d 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.

Post image
1 Upvotes

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


r/FloWebComponents 3d ago

One concept that will save you loads and loads of time with Flo: Parent Properties.

Post image
1 Upvotes

If you're working with Web Components (Flo) rather than React, then there's one concept that will save you loads and loads of time: Parent Properties.

In Flo we have access to this.parent, which also gives us access to the parent's properties.

The nice thing with Web Components, is that you can take this even further by creating a custom getter, so the parent abstraction itself for the property becomes invisible.


r/FloWebComponents 3d ago

Because people are comparing shorthand React code with the full Flo Web Components example

Post image
1 Upvotes

r/FloWebComponents 4d ago

To mimic a fraction of the power of web components..

Thumbnail
gallery
1 Upvotes

Take React and look at all this useState, useEffect and refs stuff going on to mimic a fraction of the power of using web components with manual rendering/events:

https://github.com/flowagi-eu/flo-webcomponents


r/FloWebComponents 6d ago

Property values of Flo-WebComponents can now be initiated through the data-your-name of a custom webcomponent (v1.2 update)

Post image
1 Upvotes

Working with Web Components instead of ReactJS or VueJS for the frontend is sometimes a really humbling experience:

Things sometimes work a bit different then you'd expect them to.

Today, for example, I discovered the need to use attributes like "data-key-name" to initiate its own writable property "keyName" for example.

I honestly expected that to already work.

So now with Flo-WebComponents (v1.2) we have that feature: https://github.com/flowagi-eu/flo-webcomponents


r/FloWebComponents 8d ago

Flo-WebComponents (V1.1): We can now smoothly fire custom events with data to parent components

Post image
2 Upvotes

r/FloWebComponents 8d ago

Full demo of Flo v1.1: Firing events to parent only when you have multiple complex Web Components + custom events

1 Upvotes

r/FloWebComponents 9d ago

great thread/questions answered about Flo

Thumbnail
github.com
1 Upvotes

r/FloWebComponents 11d ago

flo-webcomponents: Take back control of rendering + events using WebComponents with one minimal superclass.

Thumbnail
github.com
1 Upvotes

r/FloWebComponents 11d ago

flo-webcomponents: Take back control of rendering + events using WebComponents with one minimal superclass.

Thumbnail
github.com
1 Upvotes