I currently have a function that returns this
1
2
3
4
…
1000
I need this interactivity function to be presented in real time on the user’s screen.
button example
Html
<button class="dropdown-item" phx-click="example" phx-target="#example">Exemplo</button>
<%= live_component @socket, ProjectWeb.Example.Modal, id: "modal-one", title: "Test" do %>
<%= @example %>
<% end %>
Function:
@impl true
def handle_event("example", _, socket) do
example = function_1()
{:noreply, assign(socket, example: example)}
end
On my backend I can see the function running normally.
But the user cannot see this.
How do I present this on the user’s screen in real-time?