Skip to content
Advertisement

Tag: svelte

Use Svelte with Stencil components

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

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

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

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

Advertisement