How to Toggle Phoenix Modal Component show/hide

Massive thank youuuuu!!! the show_modal function was already aliased!

The reason for that is: I looked at lib/your_app_web/your_app_web.ex,

unquote(html_helpers()) ← this

defp html_helpers do
  quote do
    # HTML escaping functionality
    import Phoenix.HTML
    # Core UI components and translation
    import HangmanWeb.CoreComponents
    import HangmanWeb.Gettext

    # Shortcut for generating JS commands
    alias Phoenix.LiveView.JS

    # Routes generation with the ~p sigil
    unquote(verified_routes())
  end
end

Took me lots of hours why JS.show_modal is undefined on the page :person_facepalming:t5: