Replies: 1 comment 2 replies
-
|
Welcome @DrssXpro! 👋 First taking a step back I'm not sure knowing when the component renders will help with the issue you are experiencing
It sounds like your application is network and LLM token response time bound. Consider leveraging a content delivery network to speed up networking times, optimizing the app to reduce the amount of network traffic, and/or choosing a faster LLM.
To best answer you, a few things:
Avoid defining anonymous/arrow functions inside |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
example:
I will customize the rendering of the code component here:
Because the markdown content here comes from LLM streaming data,but I don't know how to get the moment when the code component rendering ends. I need to do other things at this moment.😢
One solution I came up with is to solve it through useEffect and debounce:
But you know, due to the issue of network latency in actual scenarios, this is clearly not a good approach...😢
So I want to ask for help, is there a better solution?🥺
Beta Was this translation helpful? Give feedback.
All reactions