[SOLVED] React-moralis and useMoralisSubscription for live table updates (not working)

I am trying to use useMoralisSubscription() hook in react-moralis to get live updates when a new row is created in my table. If I manually create a new row from the Moralis web interface the onCreate handler triggers properly. It does not seem to trigger when Moralis is watching contract events and putting new rows successfully in that same table. Any help would be appreciated!

my component snippet:

const Custodians = () => {

    useMoralisSubscription("MultiSigAlertNewApprovalX", q => q, [], {

      onCreate: data => console.log(data),

      onDelete: data => console.log(data),


Try on update for nitro version of the servers.

Thanks, using onUpdate worked for what I needed! Where can I read about when each of these handlers will trigger? It isn’t clear in the react-moralis docs

1 Like

The react-moralis README is the only docs that we have, which part isn’t clear?

under useMoralisSubscription() section it would be helpful to define the conditions for when each Eventname will trigger. As a newbie for example, I have no idea what onEnter onLeave or the differences between them all. Since I don’t know what package this could be derived from I get hung up trying to find this info to use properly :slight_smile: