onCreate on Subscriptio not working

Good Day!

I’m trying to update my page everytime a new event is added, but it’s not really working.

useMoralisSubscription(ā€œGameScoreā€, q => q, [], {
onCreate: data => alert(${data.attributes.playerName} was just created)
});

However, it works if I use onUpdate but that’s not what I need.

React-Moralis 1.4.2

onCreate seemed not to work for events, you can try use onUpdate instead

Ohh I see, but I need to fetch the latest data on the events.
onUpdate works but I need the latest data created.

It should work as expected when used with contract syncs

Yes, but unfortunately it’s not triggering it :frowning:

You should check if your DB is updated. And if you used the right table name