My LiveComponent no longer receives updates after temporary_assigns are implemented

I can no longer receive updates on my card component, after I implemented the temporary_assigns to be able to generate the infinite scroll action on a list of cards. For example, I can create a tag for my card, but this update is not being rendered on the card. If I remove the temporary_assigns, everything goes back to normal, but I end up trying to slow down because of the large volume of cards.

in my .leex

<div class="list-cards" id="<%= dom_id %>" data-list-id="<%= @list.id %>" phx-update="append">
                    <%= for card <- @cards do %>
                            <%= live_component(@socket, FluxoIdealWeb.CardComponent, id: "card_component_#{card.id}", list_tags: @cards_tags, user_id: @user_id, card: card, list_id: card.list_id, type_tags: @type_tags) %>
                    <% end %>
            </div>

in my LiveView

 |> fetch(), temporary_assigns: [cards: []]

We need to see the full LiveView, Component and templates to identify the issue :slight_smile:

4 Likes

Hello Chris, i managed to find the problem. It was an alignment of the loop that was wrong, now everything is ok :smile: