glassy
glassy
Explore posts from servers
SSolidJS
Created by glassy on 12/28/2024 in #support
In a File Route how to make it ignore the parent layout?
I have set a default layout at the root. Some url paths need an empty layout though. How can I escape from the root layout and override it or make it use an empty layout?
3 replies
SSolidJS
Created by glassy on 5/29/2024 in #support
createAsync vs createResource and how does Suspense work?
Hello. From doing some searches in here it looks like createAsync (+cache) seems to be the new recommended approach for data loading. I am wondering though, createResource returns a lot of information and options for the request
type ResourceReturn<T> = [
{
(): T | undefined
state: "unresolved" | "pending" | "ready" | "refreshing" | "errored"
loading: boolean
error: any
latest: T | undefined
},
{
mutate: (v: T | undefined) => T | undefined
refetch: (info: unknown) => Promise<T> | T
}
]
type ResourceReturn<T> = [
{
(): T | undefined
state: "unresolved" | "pending" | "ready" | "refreshing" | "errored"
loading: boolean
error: any
latest: T | undefined
},
{
mutate: (v: T | undefined) => T | undefined
refetch: (info: unknown) => Promise<T> | T
}
]
There is the state, the error, and options to mutate and refetch. But createAsync returns just the data. What if I want to also get the state? What if I want to mutate/refetch the data? And how should (or how can) I handle errors when using createAsync? EDIT: (Answering some of my own questions) since createAsync returns the data from createResource then it is possible to use data.loading and data.error If I use createResource instead then I won't be able to use cache. Also, I am wondering how Suspense actually works. How does it detect that some data is still loading. Is it possible to create my own resource manually that Suspense detects without using createResource?
41 replies
SSolidJS
Created by glassy on 4/28/2024 in #support
Why can't I change the path alias "~/*" to "@/*" in the tsconfig.json?
Using @/* would be easier on my keyboard. After changing it the imports work correctly in VS Code typescript, but when I run the app it complains that modules are not found. Trying to change the alias to anything else other than ~/* (eg. src/*) also doesn't work. Do I need to change it somewhere else to make it work for runtime?
10 replies
SSolidJS
Created by glassy on 4/28/2024 in #support
Does SolidStart support private folders in the routes directory?
Like described here: https://nextjs.org/docs/app/building-your-application/routing/colocation#project-organization-features Otherwise, is there a way to organize the components used for a route in a subfolder of the folder the route is in? Or is there any way to opt out a file or folder in the routes directory from the routing system?
2 replies
SSolidJS
Created by glassy on 3/5/2024 in #support
MobX + SolidJS enableExternalSource untracked bug?
I am evaluating using MobX with SolidJS and now that there is an untrack parameter to enableExternalSource I have tried putting MobX's untracked in it, but I'm running into an issue with <For> updates Please see: https://github.com/solidjs/solid/issues/1850#issuecomment-1976086047
2 replies
CCConvex Community
Created by glassy on 12/11/2023 in #support-community
I'd like an open-source version and simpler pricing
I am considering using Convex in my next project as the feature set is close to what I will likely need and it will likely speed up development a lot. However, I feel that I can't (and shouldn't) commit to building a business on a closed source/proprietary backend like Convex. First of all, I feel I can't predict the pricing at all. I don't know how I could map the number of users to the 'function calls' and 'action compute'. I haven't started learning Convex yet so I have no idea what an 'action compute' hour is. And I don't want to waste time learning Convex because I don't know if the pricing model would be ok for me. And what if my product is a freemium product where a large part of the user base uses it for free? This pricing issue wouldn't be a problem if there was an open source version to fall back on that my company could run on our own if we grow big enough. Or at least some kind of hosted plan that is more based on 'servers used' rather than uncontrollable (by us) metrics. Even so, what guarantee do I have if Convex the company itself shuts down? What if I have thousands of business users relying on my app? Picking a backend infrastructure technology stack is no light decision for a SaaS company. In Convex case it is both the backend compute and the DB, so it is even a bigger deal and these assurances are even more necessary. Looking at showcases and projects that are using Convex, there seems to be only side projects and non-serious projects. I think one of the big reasons is probably above. I have been bitten by choosing a relatively new DB (at the time) for a project before where the company shortly shut down. (It was RethinkDB.) Even though it was Open Source and development continues along by the community, it isn't anywhere near where it would expected to be. Do you have anything that can assure me regarding these concerns above?
7 replies
SSolidJS
Created by glassy on 11/25/2023 in #support
SolidStart SSR + CSR?
Beginner question: I am going to start a project that could be created as an SPA and am wondering a bit whether SolidStart would benefit me. I've used other frameworks before (Nuxt) but it's been a while and I 'm a bit confused. What I'm thinking is when first opening the app to a url in the browser, the server would render the first page for fast page load. Then afterwards if the user clicks on other urls, the client would render it on its own. Does SolidStart SSR already do that? Or does it server-side render every page?
9 replies