cbdeveloper (@_cbdeveloper) header
cbdeveloper (@_cbdeveloper) profile picture
Joined January 2019
Photo by cbdeveloper (@_cbdeveloper)Photo by cbdeveloper (@_cbdeveloper)
OpenCode's codebase is very high quality. Which is unusual for an app built with AI. This makes me curious how @thdxr uses AI to code.
15
3
2
766
137,878
@kitlangton has a good metaphor it's like tending a garden can let ai code grow but you have to aggressively clean up after it and be diligent about architecture and patterns codebase is ok it will get better
24
51
6
1,247
43,845
Feels like this is what we should have been doing all along. Many treat refactoring and tech debt as secondary work. If you don’t tend the garden, codebase quality and eventually velocity go down. This was true long before AI agents. It just piles up faster now.
35
‼️Expo SDK 55 beta is out now🧪 (RN 0.83.1 + React 19.2) Highlights: ♢ Legacy Architecture support is gone ♢ New default template (native tabs, /src/app) ♢ Hermes v1 opt-in ♢ Smaller OTA updates with Hermes bytecode diffing ♢ More native Router APIs + better brownfield support ♢...and more and more... We'll link to the release notes with details about breaking changes below ↓ Please give the beta a try and report your issues 🙏
41
85
32
730
264,222
Hey, expo-audio feels limited today for background playback controls. Are there plans to improve lock-screen/notification transport support (remote next/previous)? What’s the official Expo-recommended approach right now for managing an audio queue while the app is in background?
65
Tried an AI influencer with nano banana today. Thread 🧵👇
858
183
480
4,721
2,262,918
Made all of these using nano banana on @letz_ai. Comment IRONMAIDEN and I'll send you the prompts.
427
5
2
244
148,069
If you could join @vercel for one day and change something about the product, what would it be? I'm going to ship some quick wins to improve the developer experience during our internal hackathon next week.
341
35
9
618
Migration mode. My website is live somewhere else and while I don't connect my domain, I would like to avoid my production deployment from being indexed by robots. Once I connect my domain, finishing the migration, then robots are welcome. That's currently difficult to implement.
1
Is it a bad practice to call an API endpoint to increment a pageView counter from a useEffect? React Strict Mode calls is twice on dev mode, supposedly to expose bad practices on useEffect. This is done in a NextJS SSG app pages. Is is a bad practice? #ReactJS #Nextjs
I often get asked "How can I use [x] feature of Vercel with [x] framework?". With the Build Output API, this is now possible and already being used by Next.js, SvelteKit, Nuxt, Astro, Remix, Redwood, SolidJS, and more. Let's look at some examples.
Introducing the Build Output API: ◆ Build and inspect a project locally ◆ Deploy your build output directly ◆ Use any framework with Vercel’s infrastructure primitives vercel.com/blog/build-output…
3
12
2
146
Hi Lee, does on demand revalidation work with client side links from 'next/link'? I mean, if the user visits link1, then link2, then link1 gets revalidated. When they go back to link1 will they see the new version? Or will they get a client cached version from the 1st visit? Tks
1
Because if I'm not mistaken, this was not possible with the regular 'revalidate' directive. If the user had already navigated to link1 using a 'next/link', they would keep seeing the client-cached stale version, even though the server had already a new one.
"What will we miss?" by VSauce. youtu.be/7uiv6tKtoKg . Also a big fan of @fcain and his videos!
10 Best YouTube Channels for Web Developers. Thread 🧵👇
56
324
14
1,143
Thanks! Adding to the list: Fireship youtube.com/c/Fireship
4
Replying to @TkDodo
@TkDodo hey, how are u? I was wondering if there's a way to add a value as a 'dependency' of a query without adding it to the queryKey. For ex, when activeTab changes, refetch the query (if stale). Is a useEffect with `queryClient.refetchQueries()` the way to go in this case? 😀
1
2
Heavily inspired by @DavidKPiano's talk Goodbye, useEffect: m.youtube.com/watch?v=HPoC-k… We're not really talking about a dependency of rendering, but about something that should happen on a specific action. Most side effects belong in event handlers :)
1
2
Yeah, it makes total sense! Thanks for sharing the link for the talk as well. 😀
1
Replying to @_cbdeveloper
okay so you want to refetch because you think it's good point in time to refetch, _not_ because a dependency has changed. In that case, I would likely try to do this in the event handler of the tab component: <TabList onChange={() => queryClient.invalidateQueries(...)}>
1
1
Exactly! It's a good point in time to refetch. Not really a dependency. Doing it from the Tabs onChange handler is a great idea! I'll try that! Thanks a lot, Dominik 😀
1
1
And if I add it to the queryKey, it will always refetch, even if it's still fresh. Because the query key will change, right? That's why I'm looking for a way to trigger a potential refetch (if stale) without adding it to the query key.
2
1
This is the behaviour I'm looking for, but without having to use the `useEffect`. Maybe there is no other way here, though. useEffect(() => { queryClient.invalidateQueries( ['my-query'], { stale: true } ); }, [activeTab, queryClient]);
1
1
If you would wave a magic wand 🪄and invent anything new in CSS (and magically get implemented in every browser at once)… What would you come up with? No limits. Any superpower you want added to CSS. What do you wish were possible in graphic design on the web???
270
30
12
264
Something like height: 100avh and avw. "available viewport height/width". Meaning "expand until reach the edge of the viewport". So I don't have to keep track of header height using: calc(100vh - 120px) for example. Any other ways of doing it with what we have today?
1
Hey, @TkDodo what is the best way to access query data from a component that cannot be responsible for firing up the query? Should I just use useQueryClient.getQueryData? Obs: another component will actually call the useQuery hook.
1
2
Sounds like you'd want `enabled: !!id` to prevent that, and make the id part of the query key.
1
1
That does sounds like the best approach! Thanks a lot, Dominik! 😃
1
This will make sure the component gets notified about query updates even if the parent doesn't re-render it, e.g. because the component gets memoized. getQueryData cannot rerender on its own
2
1
I can fire it safely from the `DrawerBody` children, which is only mounted when the Drawer is open. But I also need the data on the DrawerFooter, which is mounted when the Drawer is closed as well. That's why I need the data, but can't fire the query from there.
1