Ancestors

Written by Jason Garber on 2024-11-21 at 22:14

I’m looking for good examples of well-crafted nested #WebComponents. Something along the lines of a parent component that’s responsible for adding and removing child components.

Suppose the related question is where’s the canonical “to-do” app for standards-based Web Components?

=> More informations about this toot | More toots from jgarber@mastodon.cc

Written by Chris Ferdinandi ⚓️ on 2024-11-21 at 23:11

@jgarber I recently built a component like this for a client, but the parent didn't add/remove stuff. It mostly communicated with child elements and vice-versa using custom events.

The pattern you're describing feels very "React-like," and frankly, not how I normally recommend approaching Web Components. I could see situations where it would be useful, though!

=> More informations about this toot | More toots from cferdinandi@mastodon.social

Written by Jason Garber on 2024-11-21 at 23:15

@cferdinandi I’m hoping I didn’t accidentally prescribe a solution in my original request for examples!

Any examples of parent/child components interplaying and communicating would be useful.

(I very intentionally have near zero experience with React, so any similarity to how it functions is purely coincidence. 😂)

=> More informations about this toot | More toots from jgarber@mastodon.cc

Toot

Written by Chris Ferdinandi ⚓️ on 2024-11-22 at 00:01

@jgarber let me see if I can dig up some source code!

=> More informations about this toot | More toots from cferdinandi@mastodon.social

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113523667614300911
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
377.587368 milliseconds
Gemini-to-HTML Time
0.78241 milliseconds

This content has been proxied by September (3851b).