React: autoFetch: true seems to be incomplete

const { data } = useMoralisCloudFunction(“renderChat”, {}, { autoFetch: true });

here is my sample code I have in which I am calling my cloud function. I have the parameter set to autoFetch thus I assume my data object being made will be updated whenever a change need be, but currently it seems the object is being made only when I refresh my browser which is not how I wish for it to work. Is there any suggestion on what to do about this? Having to refresh everytime is not what I wish for my application.

By default it should fetch automatically, so you don’t need autoFetch.

whenever a change need be

What do you mean by this?

Also try triggering it manually to make sure the data does change as you expect it.

If you’re looking to get it to refetch when something changes, that won’t work. You’ll have to subscribe to the data change in another way.