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

How to migrate to Svelte 5.0.0?

I have been running a pre-release of Svelte 5 as described in the package.json below.How do I migrate from 5.0.0-next.150 to the new Svelte 5.0.0 release?Below is my package.json"devDependencies":...

View Article


Get current path in svelte-routing

I'm trying to access the current route in order to conditionally redirect visitor incase the current route is "/". The way I have set up right now the redirection happens at any route if you type it in...

View Article


Creating and using dynamic variables based on a dynamic component

I have a table as a component, and now I am trying to build a column wise search within it.The table that will be created will have a dynamic number of columns. Hence I need to create multiple...

View Article

Svelte Flowbite create dropdown in {#each} block and close at select

I tried to create a page to set/change key-value pairs for the item.There is a button to create a new line in the form with two input, one select, and one textfield.I'd like change the select to...

View Article

Why do I need to explicitly set .value to make the user-showing text in an...

In the following component (range.svelte) why do I have to do inputElement.value = valueToSet; at line 24 when the input element value is bound to value (<input value={value}...)? Why isn't the...

View Article


How to update the page and query parameters in SvelteKit?

I have a page with a search field. If accessed with a query parameter (e.g. ?word=cat) the page should load with results present and the search field filled. If a search is done the results and the...

View Article

Not able to understand the effect function: speed up, slow down example in...

Svelte5 introduces effect function. On the documentation page there is an example of a simple counter with an option to increase / decrease the interval using setInterval function.Here is the...

View Article

Image may be NSFW.
Clik here to view.

Docusign Embedded Signing Loader Left Aligned

We’re using the Docusgin Embedded Signing flow with the "default" view. When loading up a document, the embedded loader appears on the screen's left, but when using the "focused" view the loader is...

View Article


How to make a Svelte child component occupy the full height of the page?

I'm trying to build a simple front-end with Svelte, where I have a main page with different possible child components. My problem is that I can't get the child component to take up the full height of...

View Article


Doing call to prisma client from load function in Svelte Kit

I'm using Prisma.io to write a database and would like to call the Prisma client from a typescript function.I tried to use the load function of Svelte kit and also writing the call in a hidden _api.ts...

View Article

Bundling the Prisma Client together with a SvelteKit build

I am using SvelteKit and the Typescript package Prisma Client together. Prisma Client is a dependency that has to be generated before the app can run. Generating the Prisma Client and then running the...

View Article

Fetch data using Prisma in Sveltekit

I'm learning Sveltekit and trying to figure out how to fetch data from my postgresql database via Prisma (prisma.casino.findMany()). I'm aware I might be quite far off in my code and would appreciate...

View Article

Getting data from Prisma directly in SvelteKit

So I'm trying to get data directly into SvelteKit from Prisma without using a API.I know that's not the way you would usually do it, and i've done it "normal" bevor, but I wanted to save some time this...

View Article


How to safely make Typescript work with a custom backend API

I am making use of API endpoint routes in my application. In these endpoints http requests about the data are processed by the backend with the help of a PRISMA ORM.However, i have to use something...

View Article

Symfony with Svelte config doesn't generate package.json

I'm currently trying to set up a Symfony project and add Svelte to the project. On their website they claim that it's easy to add Svelte UX to the project.I have the Symfony server running, but the...

View Article


With SvelteKit, in which file should I put the page options in?

According to the docs of page options here, it seems that prerender option could be put in either client files (namely +page.js and +layout.js) or server files (namely +page.server.js and...

View Article

With SvelteKit, what will happen if I disable both ssr and csr?

In the doc, there's a comment in the code snippet, saying:// If both ssr and csr are false, nothing will be rendered!What does it mean by "nothing will be rendered"? In my understanding, ssr determines...

View Article


Svelte 5 reactive $state in external module (dragListener)

I am trying to refactor a dragListener into a .svelte.js module by defining the position of the dragged element as a reactive $state() variable inside +page.svelte and pass it back and forth between...

View Article

Svelte 5: How to pass primitives reactivly across components/modules

I have a few dozens of reactive primitive values (like e.g. div_status = "frozen") which I need to pass between component/module boundaries, including +page.svelte files and svelte.js modules. These...

View Article

Sveltekit 5 snippets parameter 'x' implicitly has an 'any' type

After upgrading to SvelteKit 5, I tried the new {#snippet ...}. I am getting this type errors, but in the svelte docs it is like they do not exist for them.{#snippet NavLink(href, text)}<a...

View Article
Browsing all 1539 articles
Browse latest View live


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