This repository was archived by the owner on Jul 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
useDeno content doesn't update #189
Unanswered
lcswillems
asked this question in
Q&A
-
For example, if I put this in a component:
const date = useDeno(async () => {
const res = await fetch(
"http://worldtimeapi.org/api/timezone/Europe/London.txt"
);
return res.text();
});
The date is always the same when I refresh the page. Deno seems to cache the value but this is unexpected behavior for server-side rendering.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
The factory function is only executed on initial build, not on every refresh
You can pass "true" to the useDeno hook to fetch client-side on each refresh
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
-
Okay thank you!
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment