quiet-anteater-9502
quiet-anteater-9502
Explore posts from servers
TtRPC
Created by quiet-anteater-9502 on 4/27/2024 in #❓-help
Is there a way to use TRPC React Query Integration with Nanostores instead of the Context API?
Currently we use TRPC by wrapping out application in a TRPC context provider. However, in some use cases, such as an Astro App, we don't want to wrap our entire app in a React Context. A common solution is to share state between Astro islands using nanostores (https://docs.astro.build/en/recipes/sharing-state/). I wanted to know if there is any way to share the TRPCReact client between Astro components using nano stores, without needing to use a React Context Provider. We can already share the React Query client between components using nanostores by passing the client as a parameter to the useQuery function. However, I could not find an option to pass the trpc client in the same way. I would greatly appreciate any help on this.
3 replies
DTDrizzle Team
Created by quiet-anteater-9502 on 3/29/2024 in #help
How do I use the sql operator with better-sqlite3?
Hello. I'm trying to build a custom query with the sql operator in drizzle-orm, and to run it against my sqlite db using the better-sqlite3 driver. However, the better-sqlite3 driver apparently doesn't have a db.execute method, which is how the docs execute custom queries with the sql operator. Please could anyone help me with this?
2 replies