tylerlaws0n
tylerlaws0n
Explore posts from servers
TTCTheo's Typesafe Cult
Created by AgainPsychoX on 8/8/2024 in #questions
dotfiles
A friend wrote this years ago (for setting up with symlinks): https://ryan.himmelwright.net/post/new-dotfiles/ I took the approach of just including a ./install.sh with mine to keep it simple and then I just run manually when I update things: https://github.com/tylerlaws0n/dotfiles This is the sort of thing where there are a million ways to do it, so it may be hard to find "best practices". I'd suggest just look around to see what you like and find what works for you 🙂
2 replies
TTCTheo's Typesafe Cult
Created by Leo Wang on 7/21/2024 in #questions
What's a good way to persist a single query for React Query
I might not understand the question, but the query client exists to persist query results. So if your query key is consistent, the query client dedupes the requests if they are called in more than one component, so you can feel free to call that same query in whatever component you'd like to call it without fear of over querying. This is a major reason you'd use react query to begin with.
5 replies
TTCTheo's Typesafe Cult
Created by juan on 7/13/2024 in #questions
How would you make a package that serves a web page across multiple frameworks AND nodejs?
Astro? https://astro.build/ It gives islands, so you can write in any framework and just import the appropriate plugin
8 replies
TTCTheo's Typesafe Cult
Created by Ttttmizer on 7/13/2024 in #questions
What is a tool that can help me update packages to latest?
4 replies
TTCTheo's Typesafe Cult
Created by pavels555 on 7/11/2024 in #questions
Types union and how to distinguish them?
I think your code is completely fine. If you’re interested in learning more for when/why to use enums… this is a fantastic post on optimizing JavaScript that includes a good section about string comparisons vs enums https://romgrk.com/posts/optimizing-javascript For your use case I can’t imaging it mattering without this event being checked tons of times, but still worth understanding the trade offs and when it matter I think.
3 replies
TTCTheo's Typesafe Cult
Created by Paulo Martins on 7/7/2024 in #questions
About Theo's take of not destructuring props
FWIW shadcn/ui uses this pattern repeatedly. Not saying that doesn’t mean that it still might not be optimal, but spreading props for components like ones you’d see in a UI library is super common. Would be interesting to hear a reason when/why not to do this though.
10 replies
TTCTheo's Typesafe Cult
Created by tylerlaws0n on 7/2/2024 in #questions
Has anyone had success running a Node server on Railway.app for cheap?
Dang. Nice then. That’s cheap considering it’s always on.
12 replies
TTCTheo's Typesafe Cult
Created by tylerlaws0n on 7/2/2024 in #questions
Has anyone had success running a Node server on Railway.app for cheap?
I think I might just turn this project into a CLI tool though for now and not host it 😅 It was a helpful exercise to set it up as a robust project to try out the tooling, but the cost to run it is massive overkill for what the tool does.
12 replies
TTCTheo's Typesafe Cult
Created by tylerlaws0n on 7/2/2024 in #questions
Has anyone had success running a Node server on Railway.app for cheap?
No description
12 replies
TTCTheo's Typesafe Cult
Created by tylerlaws0n on 7/2/2024 in #questions
Has anyone had success running a Node server on Railway.app for cheap?
Thanks! I'm just gonna read through 🙂 appreciate you sharing. The logic of what I need is very very simple and my goal is to cut the cost of my service, so this is really helpful to see as an example for running things cheaply. Do you use the railway setting to sleep when inactive?
12 replies
TTCTheo's Typesafe Cult
Created by tylerlaws0n on 7/2/2024 in #questions
Has anyone had success running a Node server on Railway.app for cheap?
That probably was a bit of it. I had high cpu usage without the flag as well though. Are your projects open source? I’d like to poke through the code to see if I can narrow anything else down if you’re ok with it.
12 replies
TTCTheo's Typesafe Cult
Created by Salumsu on 7/1/2024 in #questions
Extending react-query with typescript
Could you just export const usePaginatedQuery: typeof useQuery => (…?
14 replies
TTCTheo's Typesafe Cult
Created by Ramkiller1 on 6/16/2024 in #questions
shadcn install with T3 stack
create-t3-app integrates with shadcn in a turbo monorepo setup: https://github.com/t3-oss/create-t3-app The monorepo setup won't be necessary for you, but you should be able to pattern match off how the ui package is setup there I would think.
4 replies
TTCTheo's Typesafe Cult
Created by tylerlaws0n on 4/13/2024 in #questions
For Sr+ Engineers: Frontend, Backend, or Full-stack?
What is killing you about it? Just trouble with job searching given your focused experience?
6 replies
TTCTheo's Typesafe Cult
Created by Y7YA on 4/7/2024 in #questions
Help responding to coworkers on my technical decisions (NextJS)
Clarification: I don't mean people in the sense that you work with the wrong people. I mean it is a matter of understanding the people you work with, building trust, and building good working relationships with them. I was using "people" to refer to it as a social problem, not just exclusively a choosing the best tech problem.
19 replies
TTCTheo's Typesafe Cult
Created by Y7YA on 4/7/2024 in #questions
Help responding to coworkers on my technical decisions (NextJS)
Long term advice: These decisions are people problems as much as, if not more than they are technical problems. It is easy as a new passionate dev to pickup the latest and greatest tooling and immediately see how powerful, ergonomic, and just lovely the experience can be. When dealing with a team that has been around for n+ years, they have heard these pitches and seen libraries come and go time and time again. When they were in your shoes, they very well may have been pitching their team on (fill in the blank dead library). To work with this and be successful: - Be Patient: Making decisions like this requires building up trust from your team which will be built over time by making incremental, sticky changes that are hopefully long-lasting improvements. - Have empathy: Understand that they have seen things come and go throughout their career - Understand what is important to your team: Typically their key concerns are best solved by the new, but also highly adopted libraries.
19 replies
TTCTheo's Typesafe Cult
Created by Y7YA on 4/7/2024 in #questions
Help responding to coworkers on my technical decisions (NextJS)
5. I don't think I understand what you mean with this one
19 replies
TTCTheo's Typesafe Cult
Created by Y7YA on 4/7/2024 in #questions
Help responding to coworkers on my technical decisions (NextJS)
The abandonment of forms is IMO simply just a bad practice that has popped up on teams that use react out of ease and laziness. Which is a bit self-defeating. You start the form with just an input and a button with a listener, so it's one onClick and one useState with your controlled input... Then the next week you have a task to add validation, then another for a new form field... and on and on. It is easiest to start without a sensible form strategy in react, but as the forms grow, crappy code builds exponentially.
19 replies
TTCTheo's Typesafe Cult
Created by Y7YA on 4/7/2024 in #questions
Help responding to coworkers on my technical decisions (NextJS)
better performance, better devex - not enough to convince anyone.
@Y7YA If this is not enough to convince anyone on your team, what would be enough?
19 replies
TTCTheo's Typesafe Cult
Created by Y7YA on 4/7/2024 in #questions
Help responding to coworkers on my technical decisions (NextJS)
3+. Jotai and zustand give you the nice DX of context with the performance of more targeted re-renders. Other libs are out there to solve this similarly, but it is at the least a clear boost over react context.
19 replies