Sturlen
Sturlen
Explore posts from servers
TTCTheo's Typesafe Cult
Created by harshcut on 5/24/2024 in #questions
Scaling page with respect to viewport width
afaik there is no way to make your entire website scale according viewport size, otherthan using viewport units on each element: https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Sizing_items_in_CSS#viewport_units aspect ratio might also be useful there https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio
4 replies
TTCTheo's Typesafe Cult
Created by wei on 5/23/2024 in #questions
Uploadthing multiple upload files
this is just a guess, but setting maxFileCount to Infinity might work. though I'd imagine 99999 would be more than enough
4 replies
TTCTheo's Typesafe Cult
Created by sridharK on 5/23/2024 in #questions
T3 trpc depdent query is failing ?
also renaming your hooks like event and poll to useEvent and usePoll would make it clear that they are hooks and need to be treated as such
4 replies
TTCTheo's Typesafe Cult
Created by sridharK on 5/23/2024 in #questions
T3 trpc depdent query is failing ?
without the full error message it's difficult to tell what's going on. you might be running into problems with dependent queries so the docs might be helpful: https://tanstack.com/query/latest/docs/framework/react/guides/dependent-queries
4 replies
TTCTheo's Typesafe Cult
Created by Beardeddragon on 5/21/2024 in #questions
IndexedDB sharding library feedback
also +1 for Brum image
10 replies
TTCTheo's Typesafe Cult
Created by Beardeddragon on 5/21/2024 in #questions
IndexedDB sharding library feedback
from a glance at index.ts the only part that sticks out to me is in updateItemById https://github.com/BramPostema/indexeddb-sharding/blob/1631e7dc016cb360c5f0579c2dc3edf10cba61b1/src/index.ts#L101 where you don't seem to handle case where the item is not found. is this an expected outcome? if not you could consider throwing an error or returning false to let the caller know. otherwise you should probably document it
10 replies
TTCTheo's Typesafe Cult
Created by Ali Limem on 5/19/2024 in #questions
T3 architecture
the reasoning for each part of the stack is explained on the website https://create.t3.gg
5 replies
TTCTheo's Typesafe Cult
Created by gave_one on 5/20/2024 in #questions
I'm having problems refreshing my component
I recommend using an existing library like React Query, since fetching directly has a lot of footguns that can trip you up. For adding to the cart you'd then a use a mutation, and trigger the cart to revalidate if that was successful
3 replies
TTCTheo's Typesafe Cult
Created by rob on 5/16/2024 in #questions
Running into Error: @clerk/nextjs: Missing publishableKey. when following the The Modern React Tutor
I'm out of ideas then. you might want to ask this in Clerk's own Discord server if you haven't already
14 replies
TTCTheo's Typesafe Cult
Created by rob on 5/16/2024 in #questions
Running into Error: @clerk/nextjs: Missing publishableKey. when following the The Modern React Tutor
No description
14 replies
TTCTheo's Typesafe Cult
Created by rob on 5/16/2024 in #questions
Running into Error: @clerk/nextjs: Missing publishableKey. when following the The Modern React Tutor
oops, I meant to write server component. this would only work for a server component, not a client component
14 replies
TTCTheo's Typesafe Cult
Created by rob on 5/16/2024 in #questions
Running into Error: @clerk/nextjs: Missing publishableKey. when following the The Modern React Tutor
you might need to pass it yourself to the ClerkProvider component:
...
<ClerkProvider publishableKey={process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}>
<body>{children}</body>
</ClerkProvider>
...
<ClerkProvider publishableKey={process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}>
<body>{children}</body>
</ClerkProvider>
this is assuming it's inside a client component
14 replies
TTCTheo's Typesafe Cult
Created by Mocha on 5/13/2024 in #questions
Next.js API Type Safety without tRPC?
You might want to explain the problems you're having with tRPC and what your needs are, otherwise it's difficult to recommend anything
10 replies
TTCTheo's Typesafe Cult
Created by Hamza K Dev on 5/13/2024 in #questions
Managing Multiple Promises in Next.js
I'm not sure if what you're trying to do is supported in next with server components and suspense. the closest I know of is partial rendering, but that doesn't seem to fit your use case. One solution is making each report a client component and using Tanstack Query to fetch the new data for it when it's filters change.
26 replies
TTCTheo's Typesafe Cult
Created by fotoflo on 5/9/2024 in #questions
TRPC not returning immediately on error
if there's something wrong with they query then Tanstack Query Devtools should be able to help you. https://tanstack.com/query/v4/docs/framework/react/devtools
5 replies
TTCTheo's Typesafe Cult
Created by Mocha on 5/12/2024 in #questions
[TRPCClientError]: Converting circular structure to JSON
In particular, you might be returning a Node Timeout object, which can be returned from a setTimeout function: https://stackoverflow.com/a/37777603/5502241
9 replies
TTCTheo's Typesafe Cult
Created by Mocha on 5/12/2024 in #questions
[TRPCClientError]: Converting circular structure to JSON
at a glance I'm guessing you're returning a complex object that tRPC can't serialize into JSON. More context: https://stackoverflow.com/questions/64735881/typeerror-converting-circular-structure-to-json-starting-at-object-with-con
9 replies
TTCTheo's Typesafe Cult
Created by Huperniketes on 5/13/2024 in #questions
t3 workflow?
1. I would suggest not editing packeages in node_modules. these changes can be overwritten at any new install and will not be version controlled. 2. Next should hot-reload on any changes made to source files in your project. it might not be watching the node_modules folder 3. Anyconsole.log done on the server should output in the console on the server. 4. run npm install nodemailer in your project root. after that nextauth will be able to use it. NextAuth has several ways of customizing providers. and if that's not enough I'd recommend creating your own provider rather that editing node_modules. I highly recommend you check out the examples the docs
6 replies
TTCTheo's Typesafe Cult
Created by FleetAdmiralJakob 🗕 🗗 🗙 on 5/9/2024 in #questions
What do you think about these videos
here's a response from one of those blog authors: https://vxtwitter.com/kettanaito/status/1788326003481235847
34 replies
TTCTheo's Typesafe Cult
Created by Knox on 5/8/2024 in #questions
Migrating react-query v3 to tanstack-query v4
In v4 useQuery just takes an options object:
const query = useQuery({ queryKey: ['changes'], queryFn: getChanges, ..options})
const query = useQuery({ queryKey: ['changes'], queryFn: getChanges, ..options})
more examples in the docs
5 replies