I have the following query, taking a single eth address, and returning the data we’ve stored in the database; I’m doing it in a functional component using the hook below:
const myMoralisReturn = useMoralisQuery(
'ERC20Balance',
(query) => query.equalTo('address', address),
[address],
{
live: true,
},
);
This loads data just fine the first time the query is sent, no matter what. And, if I hard-code the address, it does correctly live load. But if the address is a variable, and changes, something breaks, and data does not live load. Any thoughts on how to handle this? Is there an unsubscribe/resubscribe flow that needs to be done when the query parameters change?