Skip to content

Commit

Permalink
fix: make params derived resource reactive (#1039)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
Gregoor and kodiakhq[bot] authored Jan 28, 2025
1 parent 68e97c3 commit f4a9e80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/guides/routing-and-navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ async function fetchUser(id) {

const User = () => {
const params = useParams();
const [data] = createResource(params.id, fetchUser); // Pass the id parameter to createResource
const [data] = createResource(() => params.id, fetchUser); // Pass the id parameter to createResource

return (
<div>
Expand Down

0 comments on commit f4a9e80

Please sign in to comment.