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

Image may be NSFW.
Clik here to view.

How to fix the error during Meteor running?

I have a front-end app in Svelte. We also use Meteor. When run: npm run dev, I get the following error:How can I fix it?

View Article


How to connect to Azure SQL database using the `mssql` package in Azure...

I have deployed an Azure Static Web App (SWA) using the Svelte framework. The SWA is connected to an Azure SQL database and uses the GraphQL endpoint to query the database. I want to replace the...

View Article


Prevent focus event from firing when clicking a tree element?

The ARIA tree spec says that when the tree widget gets keyboard focus, then the first item should get focus (if no element has focus).I have implemented this behavior below, but when my click handler...

View Article

Ignore Tailwind CSS dark attribute

I am building a simple web page in Svelte using shadcn-svelte. Some of the components they ship seem to add the dark attribute as a default to my HTML element during building which is something I do...

View Article

How to make global variable reactive in Svelte?

The following code does not run when I update the window.test variable, I do not have any log displaying on my console. I thought that test() would be run. Can't we make global variable reactive using...

View Article


Svelte vs Angular vs React [closed]

What's the distinction between Svelte, Angular, and React in terms of code compilation? Specifically, Svelte compiles code to JavaScript at build time, akin to Angular. React also transforms code into...

View Article

Passing a promise to addEventListener() in TypeScript?

On a sveltekit app, I am trying to create an event listener that executes an async function (a mutation) using Typescript.onMount(() => { document.addEventListener('keyup', handleKeyPress);});The...

View Article

Svelte vs Angular vs React Compilation [closed]

What's the distinction between Svelte, Angular, and React in terms of code compilation?Specifically, Svelte compiles code to JavaScript at build time, akin to Angular.React also transforms code into...

View Article


Is it possible to pass a Svelte store as a property on a component?

I’ve got a simple REPL example for a simple list-detail editor. It’s made up of three components:Annotation is the detailAnnotations loops through the data and creates Annotation instancesApp is the...

View Article


How do I get a live stream of data from a command line program in Rust?

I'm building a tauri desktop app around tshark and want to call out to the cli in Rust and pipe results back to the UI (svelte).THis is my main.rs in tauri:#![cfg_attr(not(debug_assertions),...

View Article

Are dynamic imports at runtime in the browser (ESM) possible with Svelte?

Edit: I couldn't find a way so I exported the rendering outside the library that must be provided by the user in a callback.I'm updating a Svelte component/framework library (using Vite / Sveltekit)...

View Article

Svelte 5: Passing state and derived values from children to parent (runes...

I have a parent component with multiple draggable Item-components which will be created dynamically in the final app. Inside each Item I calculate the current position as well as a derived offset...

View Article

Data prop responsiveness issue when input bind:value in Svelt

When export let data is an object, there is a data prop reactivity problem when using input bind:value.For example, in the following case<script>export let data = {name:"jack", age:31};$: man =...

View Article


Uncaught TypeError: Illegal constructor when creating svelte web component

I am trying to create a web component from a svelte project that uses the svelvet component library. I am using <svelte:options tag="my-element" /> in my App.svelte file and set customElement:...

View Article

Sveltekit form actions not returning data when invoked from different route

I'm having issues loading form action response data in Sveltekit, when the form is submitted from a different route to the server action.The Sveltekit app has the following structure:/lib...

View Article


Svelte Checkbox input state does not match to html checkbox state

I am having problems with my custom checkbox component.My goal is for the parant to have control over the selected state of the input. But every time I click the checkbox it gets selected even if...

View Article

How to use Font Awesome 5 with Svelte/Sappe

I am writing a Server Side Rendered app with Svelte/Sapper and I am having trouble using Font Awesome fonts.I am using the following to load the font:<script> import Icon from "svelte-awesome";...

View Article


Updating steps of a StepProgress component

I'm learning svelteKit and I'm building a step progress using props so, this is my componente progressStep.svelte<script> export let steps = []; export let currentStep = 1; const isActive =...

View Article

How to add bootstrap module in a svelte JS app?

I'm very new to svelte ( like many of us ^^ ), and I didn't manage to add bootstrap to my app. Tried to run 'npm add bootstrap' but it said that I need peer jquery dependencie. Here is the terminal...

View Article

How to change page title dynamically in Sveltekit?

I'm learning SvelteKit and this might be a very elementary question. But I could not figure out how to change the tab's title.In my src/+layout.svelte I have:<script> let title="My Site...

View Article
Browsing all 1539 articles
Browse latest View live


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