we want to build an application with svelte but are stuck at using our components that we built with stenciljs. At first it looked like it worked like a charm but as stencil components use the term “slot” and svelte does too, i am reveiving an error when using this component on svelte Element with a slot=’…’ attribute must be
Tag: svelte
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
Svelte UI not properly updated when Writable of Type Array is edited
I am currently working on a crew creator for a rowing club for context. The Writable containing the array is declared as such This is how im removing the specific item from the array Where mem is the Writable<CrewMember> passed into the delete function. I’ve also tried deleting by ID and that has not worked as of yet either. The
Svelte re-rendering a virtual list of images causes images to flicker
I’m not sure if I should be posting this here or adding to svelte creators github, but I have a problem here which may need a fix to be applied on the svelte side. I am trying to render a virtual list of images, by only having the images that are shown in the viewport, in the DOM. Here’s a
Problems accessing data from a GraphQL query in Javascript with Svelte
Below I have my working function using a normal REST response that I want to try to convert into a GraphQL version, it fetches a JSON doc from my Phoenix Server and stores the object values from the JSON doc into an object. The problem is, here I can use await and then assign the new object values from the
How should I efficiently add to an array from a Svelte store subscription?
I’d like to have objects added to an array in a component each time a subscribed store gets updated. In this case, the store is receiving data from a WebSocket, and I ultimately want to plot the last N datapoints that I’ve received (N=1000 for example). The store is defined in socket.js: I then have a Chart.svelte component which should
Iterate over Store via Map
Via a Map Objects are added to a Svelte Store. Every object has an ID and it should be possible to iterate over those IDs. With $entities.get(“123”).currentPage; The current Page of this Object is returned. How can I iterate over more than one ID such that the current pages of all objects in the store are returned? Answer You could
Nested component does not render properly in Svelte/Sapper
I have three files inside a slug. I use slug parameters as directory name. The problem I am having is everything except the each loop in taglist. For some reason it does not receive the prop tagList. …
Svelte – how to make data not reactive?
I have some HTML elements that have a property color. The value of color will change over time. And I will add more of these label elements in future, but I wish only new elements inherit the new value – effectively, I wish to disable reactivity for this variable. Is this possible in Svelte? Answer Create a property labelColor and