Replies: 1 comment
-
You can always wrap anything in |
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
-
profile_user_account also don't have get_untracked() function, how to solve the error?
At src/components/schelling_game/profile_validation/game/schelling_game.rs:16:16, you access a signal or memo (defined at /home/amiya/.cargo/registry/src/index.crates.io-6f17d22bba15001f/leptos_router-0.6.6/src/components/route.rs:280:22) outside a reactive tracking context. This might mean your app is not responding to changes in signal values in the way you expect.
Here’s how to fix it:
If this is inside a
view!
macro, make sure you are passing a function, not a value.❌ NO
{x.get() * 2}
✅ YES
{move || x.get() * 2}
If it’s in the body of a component, try wrapping this access in a closure:
❌ NO let y = x.get() * 2
✅ YES let y = move || x.get() * 2.
If you’re trying to access the value without tracking, use
.get_untracked()
or.with_untracked()
instead.Beta Was this translation helpful? Give feedback.
All reactions