PDFG
PDFG
I need a way to make it work even on frameworks like Nextjs that does SPA like navigation.
One thing i always tried to learn when using React
How do i fire an action when a page load? Should i use "load" event from browser?
Somehow in every codebase i worked people do this on a useEffect with no dependencies, and i knew that's wrong, but i never knew a better way
What do you recommend?
🤯
I'm talking about a tree of React code. For example
```tsx
<SomeComponent>
<OtherComponent/>
</SomeComponent>
```
Who's the Server Component?
I really think the directives approach is the best one in terms of composition and splitting bundle.
But there's a subject that i think everyone has been annoying about
By looking a React tree, how do you know what components are client or server or hybrid?
Naming?
Imagine a LLM tool like v0 or something, that receives your custom Design System, but all components have already integrated the business logic.
From client to server, with React we have it all to solve the problem.
So I'm imagining this for example.
We build components for the LLM not for ourselves, and then give those tools (LLM + React Components Design System) to the marketing team so they can build whatever they want.
It's exciting!!!
And with RSC, we can give them full stack components!!!
I don't think we're going to stop programming any time soon. AI is just not there, can't think at all, can't create new ideas.
But one thing that is possible may be how to build UI interfaces.
>
I literally see a lot of hate around RSC without ever understanding them right.
It's a little sad, because they're really powerful.
I guess time will make them understand.
It's a cool type, but i don't see a use case for that type 😅
Heathcliff is at the head of a line of cats waiting for a catnip vending machine in the middle of the woods at night. A watching owl says "It's not legal in this state."
28 Mar 2025
One advantage of this approach it's that it's very simple to do.
Just a class with less than 200 lines of code.
You have fully infered errors and if you use it more in your code, you see a stack of all possible errors in a type safe way.
Yeah, we got typesafe server errors all the way to RQ hooks
Don't get me wrong, i use JS, well TS.
And i know it's normal to throw errors and then catch them in another layer or not.
But i never meet someone who likes that strategy, that's all.
Usually for my projects i use a custom wrapper, similar to "never-throw" but even more simpler in my opinion.
Sorry, I haven't met anyone who liked the way JS handles errors.
Is this sarcastic post?
It can't because there's not much public codebases that use Arktype, so no much data to train the models.
@ssalbdivad.dev is the goat 🐐
One question about useEffect cases? How about this? Can i remove the useEffect from this hook?
It's a good pattern to use useEffect in hooks and declare kinds of events so people avoid using it in components?
Or maybe it's automatic if all the data inside of the <Suspense> still be in cache?
Interesting, so how i will decide when i want that <Suspense> part to be cached (static) or not (dynamic) in future requests after the first one?
That's goot to hear. So i've some hope.
Thanks for everything you do.
One question, is there any comparative of popular validation libraries TS performance?
So I'm trying to find a way to in ISR without statics params, that first render make of use of Streaming, but the following be Static page.
Is this possible? Maybe in the future?
Any idea about this?
Then next users will receive the a Static page.
But what happenes when that first SSR render is too slow? Like 5 seconds?
If i tried to use instead <Suspense> to make the users move to a new page and see a squeleton or something, now i lost every static benefits.
/continue
@timneutkens.bsky.social @storyhb.com
Hi, sorry for the tag.But i wanna make some question about Nextjs ISR + Streaming
I'm trying to achieve some way the following
When using ISR and not declaring statics params, in the first time Nextjs uses SSR, then save the static part in the CDN
/continue
Why do you always forget to mention the React Compiler? It's not FGR but it solves the majority of problems.
The problem i see, is that if the onSuccess is another asynchronous call, this will make the loading state wait longer, so I think it should depend on the use case.
I forgot the dependency array :)
How do you translate a onSuccess callback of v4 to v5?
The way i do it is adding a onSuccess callback to the hook and then.
`
useEffect(()=>{
if(onSuccess && queryData){
onSuccess(queryData)
}
})
`