zimo
Cache server variable separately in db, server, front-end
This works well, but I don't want to keep defining
isLockedLocal
in all my components. I would have hoped I could create sort of a global variable that I could use. But defining it in a globalStore.ts
and exporting it I get weird errors because of createAsync()
being defined outside a route I guess. Also isLockedLocal
doesn't update in realtime. I will have to refresh the website to see the updates. I would prefer it more if isLockedLocal
worked more like a global signal.
What's the best practice here?3 replies
Prisma integration example fails in build
Oh my God this is it. I tried changing the URL in an earlier attempt but I think it failed when I gave it a sham path, so I just assumed this was not the error. But it must have found the Schema but not the db file just like you said. It all makes sense now. Thank you as always Katja :)
7 replies
Prisma integration example fails in build
Thing is, I don't want to build like the comment I linked. I want to use SQLite and not Postgres and it had been working in the past. I have tried running that command without changing db type but it does nothing.
7 replies
Navigating through @solidjs/router doesn't load global app.css
Okay thanks. I have generally defined a bunch of signals in their corresponding components, then exported them and checked them in other components.
Example: NavBar.tsx defines and exports [navBarOpen, setNavBarOpen] so that I can close the navbar when another component prompts an alert for example. (akin to "compBProp" in my diagram)
Another example is a global signal [isMobile, setIsMobile] which determines page layouts. (akin to "appProp" in my diagram)
What would be a better way to define these signals?
Use a global store in its own .ts file? Define all signals in a common .ts file?
Are there any guidelines on patterns like this?
25 replies
Navigating through @solidjs/router doesn't load global app.css
Again, here is my comment on the GH issue:
https://github.com/solidjs/solid-start/issues/1401#issuecomment-2233170499
I tried making an as minimal as possible project to demonstrate the problem:
https://github.com/zimonitrome/solid_error_demo
25 replies
Navigating through @solidjs/router doesn't load global app.css
The yellow boxes in the image are signals.
When either of the two signals are NOT imported, the css is loaded as expected. I.e. if "ref1 or "ref2" in the image is broken, the problem disappears.
So maybe what happens is that index.tsx loads compB.tsx which loads app.tsx and all along the way the app.css is seen by Vinxi as being imported by index.tsx. Hence why it gets removed when navigating to otherpage.tsx.
25 replies
Navigating through @solidjs/router doesn't load global app.css
As long as you and Nikhil are aware of the problem then I'm happy :)
It appears to only be a problem in dev anyway. It's just an inconvenience when debugging and implementing routing behaviors.
25 replies
Navigating through @solidjs/router doesn't load global app.css
Nice. I posted this even more simplified version of the problem here in the original issue thread:
https://github.com/solidjs/solid-start/issues/1401#issuecomment-2233170499
Do you think this will be visible or should I create yet another issue?
25 replies