Results for svelte
In Svelte, I am using the value of a store to change the active component on a page, which is working as I would expect. script lang="ts"> import ...
I am creating a custom Svelte store to use it as a shopping cart. I want to store CartItem[] inside. I am trying to calculate the total price*quantity...
i have a really simple component that looks like this: script> export let task script> {console.log("task-component, task:",task,...
I need to set up a new event handler for the window after a particular event occurs, so my component code is like this: script> const secondClick = ...
As you can see on the image below, my css variables is defined but doesn't shown up on the screen. On my react app it was worked but now it seems it c...
I have created a readable store in a svelte component (src/components/myComponent.svelte) like so import { readable } from "svelte/store"; export let...
I am using Deno and I am getting this error in the browser: Uncaught TypeError: Cannot read properties of undefined (reading '$$') This is bunder.ts: ...
How could I set a private svelte variable for the unit testing? E.g. I have the component: //a.svelte script> let a = "b"; script> div data-testi...
I'm converting a VanillaJS website to Svelte, where it's needed to have divs randomly positioned on the webpage. Note that each of the div size can va...
I am building a simple Svelte application to show JSON in a tooltip. However, it is not show prettified (nicely formatted) JSON. I am using the Flowbi...
I'm using SvelteKit to build a very little static website that I deploy manually via SFTP. When in dev mode, the website is located at the route's roo...
I have a list of players from which I can remove a player by clicking a button, to make it more dynamic I added a fly transition when the element is r...
Instead of using regular approach: ="myslot" /> I would like to render slots from $$props.$$slots directly. So far, I couldn't achieve that with any o...
I have a list of players from which I can remove a player by clicking a button, to make it more dynamic I added a fly transition when the element is r...
Background information I am trying to learn Sveltekit and wanted to create a dashboard together with Bootstrap tab components. For this I wanted to us...
I want to store the width of a parent component and pass it down to its child component in : Parent bind:clientWidth={width}> Child width={width}>C...
Good day/evening! I've been at this one for a few days now, moving around parts to try to isolate and resolve the issue. I appreciate any insights yo...
I'm using svelte for a personnal project and i'm wondering if someone has the trick to do that. I've a list of blog pages and for each pages i've a ne...
I have a Svelte store in which i have an ASCII-Logo. Here I wanted to define a button spanning two Symbols (e.g. "-."). Because I didn't want to split...
I have taken this from Svelte docs It is important to note that the reactive blocks are ordered via simple static analysis at compile time, and all th...
I am getting this error "Cannot use a declaration in a single-statement context" when using $: syntax in the script with lang="ts" in +page.svelte fil...
I have a svelte component like this: script lang="ts"> import { faBarsStaggered } from '@fortawesome/free-solid-svg-icons'; import { onMount }...
Say I'm working on Foo.svelte in VSCode. I don't know which parent component contains , and I want to find out. How? In react, I could use Find Refere...
script lang="ts"> import { enhance } from '$app/forms'; import type { SubmitFunction } from '@sveltejs/kit'; export let action: string; ...
I have this project svelte-mpa, what's that I tried to upgrade to svelte-4, but svelte/register already deprecated on svelte-4. What's the proper repl...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?