I have an app that contains a Button and an Alert box. I would like the Alert to be hidden when the page first loads and when the value of a localStorage variable named "TEMP_ID" is empty (does not exist).
When the user clicks a button, it will execute a Resource Query (specifically its an REST API Call that returns JSON, of which there is a field in the JSON response called tempId). If that API Call comes back 200, then I want to set the localStorage variable TEMP_ID with the response's tempId value. And hopefully, since the Alert box's visibility is set to be hidden only when TEMP_ID is empty, now that TEMP_ID = tempId (from the response JSON), the Alert box displays.
I've tried many different things but can't seem to get it working, any ideas on how I can stitch this altogether?