-
I want to render a large array which has complex object. now I use <Suspense fallback={<div>loading...</div>}>
<Await resolve={listPromise}>
{(list) => {
return list.map((item, index) => {
return <div key={index}>{item}</div>;
});
}}
</Await>
</Suspense>; but the question is, before the I want it can be like the |
Beta Was this translation helpful? Give feedback.
Answered by
kiliman
Jun 5, 2024
Replies: 1 comment
-
You should use server-sent events |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
SteveSuv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should use server-sent events
https://stackblitz.com/edit/github-xzkcug-svg9wj?file=app%2Froutes%2Fsse.chat.tsx,app%2Froutes%2F_index.tsx,app%2Froutes%2Fchat-sse.tsx