Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

When to use form actions vs. on:submit?

$
0
0

I am currently learning Svelte and SvelteKit and so far I like it.

However one thing that puzzles me a bit is the question when I should use form actions and when should I use a simple on:submit handler?

Are there different use cases?Or maybe they can be both used at the same time?What should I do if I want to send JSON data to an external API?

Thanks for any tips!


Viewing all articles
Browse latest Browse all 1541

Trending Articles