InnerSun
InnerSun
Explore posts from servers
SSolidJS
Created by Grahf on 2/22/2024 in #support
stop screen flicker from createResource refetch?
I remember I had that kind of issues unless I used .latest Try to use fetchedOnline.latest in your JSX ?
As of 1.4.0, data.latest will return the last returned value and won't trigger Suspense and transitions; if no value has been returned yet, data.latest acts the same as data(). This can be useful if you want to show the out-of-date data while the new data is loading. https://www.solidjs.com/docs/latest/api#createresource
11 replies
SSolidJS
Created by Minoo on 2/21/2024 in #support
How do I upgrade a solid-start project to use the latest version of solid-start
Take a look at https://github.com/solidjs/solid-start/discussions/1052 1 . Remove the solid-start package and replace with @solidjs/start 2. The main changes are that you need to import stuff from @solidjs/start, @solidjs/meta and @solidjs/router packages, and that you need to update root.tsx to app.tsx. 3. The package.json scripts should also be updated to use vinxi :
{
"name": "solid-start-vite-pwa",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start"
},
...
}
{
"name": "solid-start-vite-pwa",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start"
},
...
}
4 replies