Conditional on change of text

Hi quick question:

My app brings in data from an API. This takes a few seconds so the user is forced to look at old or wrong data until the new data comes in.

I would like to put a shield over the text boxes while the data comes in, but I dont want to use a timer for this. I would like the condition for the shield to be something like "When text changes in textbook, this shape changes visibility. Or a state toggles or something that would allow me to make the shield go away when text in a text box changes or when I know the data from the API if finished loading.