Post

> why are they needed to better align with one of the platform things that is pretty ergonomic. > what would they look like in jsx? no clue. JSX (as is) isn't isn't flexible enough -- it's kind of a lossy format, as JSX + React doesn't differentiate semantics from any of the props.

Like, just by looking at props, you can't *know* how it's going to be used. With a slot, you can only pass markup / components, etc. It's a narrowing of API without runtime checks

That's fair -- I can describe the types of things passed to a component like these types of things: props = { 'aria-disabled: { type: 'attribute', value: boolean }, count: { type: 'argument', value: number, },

0 reposts0 likes

'left-icon-slot': { type: 'slot', value: (...args: unknown) => DOM } } I find that having these 3 types of things split out (via syntax) really helps with scannability of components.