Hi everyone,
I'm trying to implement a login modal in Retool that opens conditionally based on user authentication.
In various guides, I see expressions like: {{ !state.loggedInUser.value?.email }}.
But when I use this, I get the error: "state is not defined".
Here’s what I’ve done so far:
- Created a temporary state variable called loggedInUser with an initial value of {}.
- I tried using "state.loggedInUser" under a modal’s visibility condition.
- Also attempted to access it in JS queries and components.
- Refreshing the app as mentioned here.
I’m unsure if I'm missing a setup step for state variables, or if I should be referencing them differently (e.g., variables.loggedInUser or something else?).
Any help, please? I feel disappointed