Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Browsing all 1539 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

Svelte dev mode takes 20 seconds to refresh/compile/HMR when including...

In dev mode it takes 20 seconds to refresh/reload when including bootstrap in an inline style block. @import '../../../node_modules/bootstrap/dist/css/bootstrap.min.css';It's probably caused by Unused...

View Article


Why is needed for the nested object to be displayed if is present?

This question is in reference toPass in a slot to a recursive componentREPLApp.svelte<script> import Tree from './Tree.svelte'; const items = [ { type: 'person', first: 'Maru', last: 'Doe',...

View Article


Keyed each block VS Reactive declaration (Svelte)

I'm following the Svelte tutorial at https://learn.svelte.dev/tutorial/keyed-each-blocks and there is this example for keyed each blocks :App.svelte :<script> import Thing from './Thing.svelte';...

View Article

How I can disable many specific dates in Melt UI calendar?

I have this property for Melt Calendar:const { elements: { calendar, heading, grid, cell, prevButton, nextButton }, states: { months, headingValue, weekdays }, helpers: { isDateDisabled,...

View Article

Host SvelteKit project in Microsoft IIS

I've been trying to deploy a svelte application into an IIS server my company has provided. I've tried using this adapter, but i couldn't manage to make it work.Should I keep on trying on maybe suggest...

View Article


Using SlickGrid (v5.x) with Svelte (or Sveltekit)

I was wondering if anybody has managed to integrate SlickGrid (the latest Typescript version) with Svelte? I can see that people are using it with React and Angular, but can find no info on Svelte. I...

View Article

How to add types to custom events in svelte actions and use directive

I am currently looking for a way to add types to the custom events emitted from the custom action to be used in use directive I am creating. Here is the snippet.import { z } from "zod";const...

View Article

Svelte store : work in layout but not in page

In a sveltekit application, I'm using the store to save a user email after success logged in. The store seems to work in the layout but not in pages. Can someone explain me what I'm doing wrong ?...

View Article


Rollup pack scss into multiple bundles

I am using rollup-plugin-scs(v3.0.0) plugin in rollup(v2.62.0) to pack my svelte(v3.44.3) application.There are two sets of scss files. One set is for left-to-right languages, and the other for...

View Article


Does Svelte facilitate dynamic CSS styling?

In Svelte, how should classes be changed on elements depending upon component state?For instance, you may wish to apply a class to a button under certain conditions, as in the following...

View Article

Svelte with prettier/eslint

I am trying to make an app using svelte to try it out.I would like to setup prettier and eslint, I installed those dependencies and the extension for Svelte for VS Code."dependencies": {"eslint":...

View Article

How to redirect from within and async function in Svelte?

When using redirect() from inside an async function, the script crashes with this error.Using import { redirect } from '@sveltejs/kit';How can I redirect from within an async function in...

View Article

How to stop execution in Svelte?

For example, in PHP it is possible to stop execution using exit();.How do I simply stop the script from continuing?Not shutting down the server, but ending the request and showing a blank message on...

View Article


Svelte how to wrap an on:click event in a child and await the parents function?

I'm trying to make a button component that will hide the button and display a spinner when it is clicked and is waiting for some asynchronous job to complete, and then hide the spinner and display the...

View Article

Svelte - access child component's method

I have an app that simply hides content Hidden.svelte:<script> let shown = false; function show() { shown = true; }</script><svelte:options accessors={true}/>{#if...

View Article


How to use Svelte in Rust based Loco MVC framework?

I am trying Loco web framework written in Rust and inspired by Ruby on Rails.I installed Loco and created a offical SAAS app using steps given at https://loco.rs/docs/getting-started/tour/Details of...

View Article

Why does my screen go blank when I invoke a modal?

I created some buttons within a grid (which I wanted to determine the size dynamically), and now I'm trying to open dialogs/modals, but I don't know why It does not work. I have my REPL link to use,...

View Article


How to force svelte component to mount in an {#if} block

I have a sidebar with collapsible sections that use slots like this:<Sidebar> // creates writable context<Searchbar /> // updates context<Collapsible><MyControl label="hello" />...

View Article

In WebRTC, I can establish a connection on my own computer, but I cannot...

https://github.com/chillyen/Funny-cat/blob/main/src/components/ChatInterface.svelteIn the ChatInterface.svelte file below, I have confirmed that my STUN and TURN servers can connect. However, in my...

View Article

I don't understand what Svelte docs is trying to say about reactive statements

I have taken this from Svelte docsIt is important to note that the reactive blocks are ordered via simple static analysis at compile time, and all the compiler looks at are the variables that are...

View Article
Browsing all 1539 articles
Browse latest View live


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