Ramsay
TTCTheo's Typesafe Cult
•Created by Gramps on 10/24/2023 in #questions
data visualization in react
If you have experience with d3 and want something custom, you can absolutely integrate it with React. Here's a good example https://www.youtube.com/watch?v=kPbRDn5Fg0Y
If you just need to render some basic graphs highcharts works.
5 replies
TTCTheo's Typesafe Cult
•Created by zendev on 10/6/2023 in #questions
Best practice for providing current user from db to all react components?
And here's another article about how it works. https://tkdodo.eu/blog/inside-react-query
calling useQuery many times creates multiple observers, but only creates one query as long as the querykey is the same. The query internally handles request cancellation and de-duplication.
9 replies
TTCTheo's Typesafe Cult
•Created by zendev on 10/6/2023 in #questions
Best practice for providing current user from db to all react components?
Right. You create one procedure, then call useQuery in every component that needs the data. Calling useQuery in multiple components does not create a new query every time. It only fetches the data if it's stale, otherwise it uses the cache.
9 replies
TTCTheo's Typesafe Cult
•Created by zendev on 10/6/2023 in #questions
Best practice for providing current user from db to all react components?
Same way you'd give your components access to any other data. Create a trpc procedure and call useQuery. Revalidate the query when user data changes.
9 replies
TTCTheo's Typesafe Cult
•Created by Deras on 9/19/2023 in #questions
Looking for an up-to-date RN CLI tutorial
I would probably only use tamagui for web + mobile. Never have made a cross platform app yet. I prefer to just make two separate apps.
19 replies
TTCTheo's Typesafe Cult
•Created by lapuerta on 9/20/2023 in #questions
Using NextJS as backend for a mobile app
You can check this out once you realize it's a good idea. https://github.com/t3-oss/create-t3-turbo
5 replies
TTCTheo's Typesafe Cult
•Created by lapuerta on 9/20/2023 in #questions
Using NextJS as backend for a mobile app
Why would you wanna have two backends? You're saying the cons outweigh the pros but what are the cons of using Next for the backend? I can't think of any.
5 replies
TTCTheo's Typesafe Cult
•Created by Maz on 9/20/2023 in #questions
how to css
This is very basic stuff
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flexible_box_layout/Basic_concepts_of_flexbox
This should give you all you need
3 replies
TTCTheo's Typesafe Cult
•Created by Deras on 9/19/2023 in #questions
Looking for an up-to-date RN CLI tutorial
I think it looks great but it has too much config imo. It took me so long to set up I just gave up. I want component libraries for convenience lol. I just make my own components with stylesheet
19 replies
TTCTheo's Typesafe Cult
•Created by Deras on 9/19/2023 in #questions
Looking for an up-to-date RN CLI tutorial
19 replies
TTCTheo's Typesafe Cult
•Created by Deras on 9/19/2023 in #questions
Looking for an up-to-date RN CLI tutorial
People just have a misunderstanding of Expo due to it's past. "Ejecting" is not a thing anymore. https://docs.expo.dev/faq/#is-expo-eject-deprecated. In Expo you have the "managed" workflow and the "bare" workflow. The "managed" workflow is where expo handles the generation of your native files for you. So packages that have changes to native code require you to create a config plugin to stay in the managed workflow. Otherwise, you can just handle the native code changes yourself and use any library you want. This is the "bare" worfklow and this is what I mean when I say that every native module is compatible with expo. When people say that a library is not "compatible" with expo, or that you have to "eject", they usually mean that is does not work with Expo Go, which is a development client that you can use with Expo that you don't have to use. It's just there for convenience.
19 replies
TTCTheo's Typesafe Cult
•Created by Will on 9/20/2023 in #questions
As a nextjs + shadcnui user going to expo + react native, what libraries should I know about?
Well Shadcnui is essentially just a good way to use Tailwind with Radix. Radix is just an unstyled and accessible component library. The Radix equivalent of React Native would be Gluestack or React Native Elements. So the shadcnui equivalent would just be some copy pasteable way to use these libs with Nativewind. Just hasn't been built yet.
8 replies
TTCTheo's Typesafe Cult
•Created by Deras on 9/19/2023 in #questions
Looking for an up-to-date RN CLI tutorial
Every rn native module is compatible with expo. Expo is just react native + extra tools.
19 replies
TTCTheo's Typesafe Cult
•Created by Will on 9/20/2023 in #questions
As a nextjs + shadcnui user going to expo + react native, what libraries should I know about?
I personally am a shadcnui and tailwind user on web, but with React Native, I personally don't like nativewind. I find that ui on mobile tends to be much simpler to write so I don't need so many classes. I just use inline styles and don't end up missing tailwind too much. Also, the differences in how css works in RN makes me not like it as much. For example, since rn doesn't have grid, I find myself making grid layouts by using the flex property with different int values which tailwind doesn't have classes for.
As for shadcnui, there's no copy pasteable library equivalent, but the closest I've seen is gluestack. Tamagui also looks good but there's a bit too much config involved in that one for my taste. I personally just create all my own components as I need them and use the StyleSheet api.
8 replies
TTCTheo's Typesafe Cult
•Created by zendev on 8/23/2023 in #questions
Alternative to Clerk for cross-platform app (Next.js / React Native + Expo)
Supabase is great
11 replies