Skip to content

Tag: svelte

Trying to get a value from a custom store Svelte

i want to ask something, i have a custom store like i will explaying the scenario, im creating a script for a fivem server and im using svelte, i create a store that get a Vehicle with some properties like Name, Last Name, Plate and bla bla, i create the setData(Vehicle) and pass a set(Vehicle) then in another method i

Unable to update nodes position using d3 force and Svelte

I’m trying to create a simple network using D3 force and Svelte. The network position should depend on the container dimensions computed using bind:clientWidth and bind:clientHeight. I mean that if the network container has width=200, height=300, then the network center should be x=100, y=150. The code that creates the graph is this: It’s very simple: width and height are props.

How to Compile a Svelte file to JavaScript from the Command line?

I’m new to Svelte. Quick question: Is there a CLI for the Svelte compiler, and how do I access it? I understand Svelte has a preconfigured setup that uses rollup and what not for building an app. That’s all good, but I only need the CLI for transforming a svelte file to pure js file. Something like: svelte compile input.svelte

Using Svelte, Fable and Tauri

I’m creating a Tauri app that uses Fable to compile F# to JS. And I want to use Svelte with it, too. So far, I have compiled my F# file to a .js file. I’ve created a .svelte file with the following contents (named App.svelte) My index.html: And my main.mjs: I run the program with npm run build. This compiles

Retrieve value from IndexedDB using Dexie and Svelte

I don’t understand how I can get a value from IndexedDB using Dexie. Database is all good in ‘application’ tab in inspect tool. Total newbie, so please be understanding. My db.js App.svelte Whatever I try, object with daysMax={total} outputs undefined, [object Object] or something like [Dexie object Object]. I just want to get 20 from db, as seen in db.js:

How to style AG grid in svelte?

I am trying to add styling to my AG grid but so far I have not been successful. The only way that has worked is setting some css variables given by the library but that is quite limited. I tried extending the existing classes but I always get Unused css selector warning and I haven’t been able to find a

three.js over cdn using svelte or react

Is there any way of building my svelte or react application in a way, that the three.js module (which I usually import using npm) will be declared as a script tag which will call the module from a CDN? I would like to keep the advantages of a framework but also be able to reduce my final bundle size, since

Is it posible to use a State Machine without using Conditional Statements on the Current State?

I want to use a state machine where the current state is mapped to the current screen. I am using svelte with xstate. Example with string as type: App.svelte machine.js How to do the same with a svelte component instead of a string? Instead of <p>{$toggleService.value}</p> something like this <$toggleService.value /> Edit: What I tried: Create Lobby and Login svelte