A question about using async. #3457
Unanswered
ZhangXiChang
asked this question in
Q&A
Replies: 1 comment
-
If you're using Suspense, which is preferred for data fetching, you can use: https://docs.rs/yew/latest/yew/suspense/fn.use_future.html The futures example shows how to fetch data without suspense: https://github.com/yewstack/yew/tree/master/examples/futures |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
"https://github.com/ZhangXiChang/webapp/blob/master/frontend/src/main.rs"
This is the link to my code.👆
I want to know how to render the results requested from the server to the web page in real time?
In my code I request the title string from the server and store the result in a variable and then use it in the html. However, when the web page is rendered, the web page is rendered before the result is requested, causing the title variable string to be empty. After requesting the results, the web page has been rendered.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Update web content in real time.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
Questionnaire
Beta Was this translation helpful? Give feedback.
All reactions