Setting assigns for layout-level component is shadowed by ... something?

I understand the feeling. I think there can be some adjustment required if you’re coming from different frameworks. But stick with it if you can. Hopefully it will start to make sense and you’ll come to love it :grin:

Hypothetically you could just pass the whole conn struct around everywhere and each component consumes it and does whatever it wants. The drawback I find with that is that at some point you might change what’s in the conn, or how it’s structured, and then a bunch of components all over the place break.

You’re probably already aware of it but I have found it useful to deal with nil values by conditionally rendering a component with the :if directive. For example, if the account widget should only render if the @avatar value is available:

<.account_widget avatar={@avatar} :if={assigns[:avatar]} />