WELCOME 👋 friends to this new blog post. In this blog post, you will learn how to fetch data or get alerted whenever a row is inserted, updated, and deleted in the supabase Postgres database with the help of a supabase subscription, 😁Pretty easy to setup.
Suppose, I gave you a project of making a real-time chat app with supabase. Then you need to fetch data whenever a new chat is inserted, deleted, or updated.
First, you need to go to the supabase database settings:
**Note: **I have selected my tables, the table settings would be different from yours.
👀Note: The tables which are enabled by clicking the green button will be able to make real-time data fetching.
**on 👆 **can have three 4 types:
INSERT — Listening to the table if any new row is inserted
UPDATE— Listening to table if any row is updated
DELETE— Listening to table if any row is deleted
- — Listening to the table for all the above changes.
you will get a response something like this:
For People who understand Hindi: https://youtu.be/ECIfs9bb7OA
Thanks for reading, if any error comes, feel free to ask here 👇:
Join the Next Dev's server Discord Server!