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

Sveltekit reactive Forms

$
0
0

quick question.I'm kinda new to SvelteKit and i have a form that looks the following way:

I have two input fields, one is for the userType (select) and another one is called action (select).the usertypes and actions come from the +page.server.ts as PageData.Now, if the userType gets changed from regular to admin, the actions in the input action change too.In Angular i remember, using ngrx, the Store was refetching the api and then updating the selectable options (observable).how would i achieve this in sveltekit?

should i write my own abstraction in reactive svelte statements e.g$: fetch('actions/?=userType=${$userType}').then(res=>$actions.set(res))?or what is the correct way?


Viewing all articles
Browse latest Browse all 1545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>