Skip to content

Conversation

@NTBBloodbath
Copy link
Member

As the documentation for the link component in Phoenix states, navigate and method cannot be used together. Using href with method is the right way to call our logout endpoint with DELETE, as href will also force a full page reload on logout and thus clearing all client-side state which is our desired behavior.

See: https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html#link/1

As the documentation for the link component in Phoenix states, `navigate` and `method` cannot be used together. Using `href` with `method` is the right way to call our logout endpoint with `DELETE`, as `href` will also force a full page reload on logout and thus clearing all client-side state which is our desired behavior.

See: https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html#link/1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants