Category "svelte"

Which is the best/most idiomatic way to communicate with components in Svelte?

I am trying to understand how to communicate with Svelte components. In my app I have created two components. In one, Antescript.svelte, I communicate with App.

Is there a way to run prisma in the sveltekit load function?

I have a sveltekit app I'm working on and it includes Prisma, I have been trying to pass a posts Array to all of my routes via the __layout's load function. Thi

Svelte how to import

I am working on my first svelte project and are trying to use google-api-wrapper with the only change being that i import: import Google from "google-api-wrappe

How to use an external backend with SvelteKit

I want to use SvelteKit with an external backend. Let's consider the backend is not in NodeJS, already done and running and that every bit of non-static data co

How to fetch data from endpoint in Sveltekit version v1.0.0-next.287

Yesterday I updated SvelteKit version from v1.0.0-next.241 to v1.0.0-next.287, and since I cannot fetch data in the component. I get an error message: Unexpecte

Web components with vaadin and rollup with svelte: Primary button ignores theme attribute

Maybe someone tried this before and is able to give me a hint. I have used normal svelte setup (mentioned in the main page) which scaffolds the app; npx degit s

How to add Google Analytics tracking ID in svelte

I want to add my Google Analytics Tracking ID- UA-XXXXXXXXX-X to my svelte app. I found two ways of doing it. First using Install the global site tag here <!

How to animate array values in svelte with tweened store?

I have a writable store with following data let array= writable({ skills: [{ id: 1,

Hide Svelte component from outside script

I am importing a third-party Svelte3 component with several children. For the sake of example, the third-party component looks like the following: <script>

Sveltekit - How to access a "reactive context" (a store passed down via context) in the Script tag of Child Component?

I'm initialising a Class in the onMount function of a Parent Wrapper component and want to expose it to all the children. I'm currently using a writable store t

How to change the default port 5000 in Svelte?

I am not getting how to change the default 5000 port in Svelte to some other port if we install the sample template through degit.

TypeScript get Svelte component's prop type

Let's say you are using a component that has been imported from elsewhere <Animal species={animalSpecies} /> // species has a specific type and you want t