Del
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Del on 3/10/2023 in #questions
React Hook Form: Number Input not respecting Min/Max values
Have some dynamic min/max values that I get from a trpc endpoint so I can't just define min/max values in my zod schema
For some reason, I can't get number inputs to honor the min/max defined within the register params.
https://codesandbox.io/s/sharp-wilson-578ie6?file=/src/App.tsx
Any help/advice would be appreciated
2 replies
TTCTheo's Typesafe Cult
•Created by Del on 3/9/2023 in #questions
ReactHookForm + ZOD: Validating against stateful values
Hi, I'm currently trying to build a currency conversion app as a personal project,
I have an input form that allows a user to pick their desired currency to send/receive, when this choice happens I query an API which returns a MIN/MAX value to transact.
How do I make another currency amount input use these as rules?
I can use the native html rules like:
But these do not provide errors in the same way that the ZOD resolver does.
3 replies
TTCTheo's Typesafe Cult
•Created by Del on 2/25/2023 in #questions
Caching Data for a trpc endpoint
I need to hit an external API every few minutes to update my local data
Call this BigDataList
I have a trpc endpoint
- GetOne
GetOne edits and reformats a single item of BigDataList and returns it
How would I go about caching BigDataList so it only updates every few minutes?
4 replies
TTCTheo's Typesafe Cult
•Created by Del on 2/12/2023 in #questions
Off-Topic Animating using Framer
I'm trying to build a vertical carousel in react and I'm really stuck on how to actually animate the position changes
This might be a fundamental misunderstanding about how framer motion works etc, any help is really appreciated
2 replies
TTCTheo's Typesafe Cult
•Created by Del on 1/31/2023 in #questions
Nested Params
Trying to get a nested param variable rn
Have
Looking to prerender a bunch of separate section pages for each main slug, just curious if you have anybody has any examples/docs of how I actually manage the params with getstaticpaths/getstaticprops
1 replies
TTCTheo's Typesafe Cult
•Created by Del on 1/24/2023 in #questions
Easiest to integrate CMS?
Thinking about starting a project that requires a ton of markdown files to be edited from multiple places,
Needing a CMS to achieve what I'm looking to do but can't figure out which one I should opt for since I haven't had much experience with using CMS combined with T3,
Does anybody have any recommendations for something that works well with typescript?
12 replies