You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error I get when I try to compile this component is ReferenceError: stance is not defined. As it turns out, the solution is changing the stances object from a const to a let. It wasn't immediately obvious to me that all components of a reactive assignment must be mutable, so I think an error that calls that out will save a lot of headaches.
Something along the lines of "A reactive assignment cannot use variables declared with const".
The text was updated successfully, but these errors were encountered:
Oops. I'm realizing now that I declared TWO const variables and that's why it was yelling. my want for a better error message still stands, but I can get away with a const map if my position is a let
Hello! I've run into an issue I resolved thanks to the discord, but this seems useful for anyone coming into v3 (either from v2 or another framework).
Here's a small component I was experiencing trouble with:
(This repros in REPL)
The error I get when I try to compile this component is
ReferenceError: stance is not defined
. As it turns out, the solution is changing thestances
object from aconst
to alet
. It wasn't immediately obvious to me that all components of a reactive assignment must be mutable, so I think an error that calls that out will save a lot of headaches.Something along the lines of "A reactive assignment cannot use variables declared with const".
The text was updated successfully, but these errors were encountered: