phoenixframework / phoenix_live_view

Rich, real-time user experiences with server-rendered HTML
https://hex.pm/packages/phoenix_live_view
MIT License
6.14k stars 921 forks source link

Nested slots within function components #3255

Closed bcardarella closed 4 months ago

bcardarella commented 4 months ago

I understand the reason for not allowing nested components like so:

<.foo>
  <:bar>
    <:baz/>
  </:bar>
</.foo>

but what would be nice is if slots that render function compoents supported their slots:

<.foo>
  <:bar>
    <.card>
      <:baz/>
    </.card>
  </:bar>
</.foo>

In this example <:baz> is a slot for <.card> and shouldn't be viewed as a nested slot within <.foo>

chrismccord commented 4 months ago

This has always worked. Can you share function component definitions and a template where this errors?

bcardarella commented 4 months ago

Maybe we got in a bad compile state as we cannot reproduce now. If we see it again we'll copy the stacktrace.