SWR or React Query
Does anyone know when to pick either SWR or React Query? Also, have theo already mentioned this kind of topic?
Need help with typescript stuff
I am trying to implement the
Maybe monad in typescript. It's like the Option type in Rust.
Here's what I have so far:
```ts
const None = Symbol("None");...tRPC middleware
I tried doing what I saw here, but since t3 is typescript it doesn’t allow null. Has anyone done something like this?

looking for t3 project collaborators
Hi, I have several side projects (all in t3 stack) and I'm looking for collaborators. They are:
- A daily writing challenge app
- A focus and productivity app
- A code snippets saver...
tRPC in getServerSideProps
this is the code im writing in the getServerSideProps
```export const getServerSideProps = async (context: any) => {
const session = await getSession(context)
const { id: shopId } = context.query...
use query results in state
Hi, I want to query my database for routes, and then set the DashboardState with the data from the query result. How can I do this?
```interface DashboardState {
isNewRouteModalOpen: boolean;
isEditRouteModalOpen: boolean;...
Underscore variable is still triggering eslint `no-unused-vars`. Why?
How can I optimize this code so that this eslint rule wort triggger?

Protected Routes
How do you create your Protected Routes?
I've seen a lot of suggestions to use middleware, but for that, I need a JWT, and I use server cookies (which is probably safer - or should I rush the JWT?)
However, I am not talking about the fact that the user is redirected from the protected page if he/she is not logged in. I mean, I need more advanced filtering....

JWT Session Error in Next Auth
I am setting up simple discord auth using next auth but I am getting a JWT Session Error, I have not touched anything from ct3a scaffold
Help defining Prisma schema
Hi guys I need some help defining my prisma schema.
I have this template schema in which I would like to add tags:
```ts
model Template {...
TS possibly undefined object
Im getting a warning that numberOfQuestionsPerCategory[category]; might be undefined
Why is this - i checked above if it was undefined?...

server component throws error
``tsx
export default async function BotCommandsSection() {
const commands: BotCommandsResponse = await fetch(
${BASE_URL}/api/commands`
).then((res) => res.json());...trpc first callH
Hi there! I'm trying to create my first trpc route, trying to copy the example route
1. Define a router in
src/server/trpc/router/route_name;
2. Import and register the router in src/tprc/router/_app
3. import the router into the component from src/utils/trpc";...
Astro as a multi-app host (i.e. microfrontends)
This might be a silly question...but would Astro be a ridiculous thing to use to host multiple apps? I.e. think Google Docs.
Could just use Astro for the header navigation and each "app" could just be hosted on its own page. Astro would take care of the auth, and provide a unified SPA like look and feel while hosting multiple apps. The apps would just be a single component on each astro page.
I'm trying to think if there are any downsides here. Would simplify deployment, and it would allow apps to be written with different frameworks, all while keeping a common look and feel....
Battling TypeScript Types
I have been struggling with this typescript issue for a bit now and not sure how to fix.
I have an object containing some data that I import. It looks like this.
boom has a crazy long type considering each of the objects in the array. (where I think this is making things hard).
```ts...
trpc useQuery fetch on demand
```const [query, setQuery] = useState<string>('')
const [suggestions, setSuggestions] = useState<Shop[] | null>()
const { error, data, refetch } = trpc.shops.getByName.useQuery(query)
...
Import order
is there a vscode extension or prettier/eslint setting to do this?
```ts
// packages first
import a from 'a'
import c from 'c'...
Initial React Context value.
Let's say my ContextProvider looks like -
```
type Action = {type: "modal_open"} | {type: "modal_close"}
type Dispatch = (action: Action) => void
type State = {isModalOpen: boolean}...
