I’m working on food delivery app, as a personal project to learn React Native I’ve build the client-side app that fetches the menu from a db and inserts the order into the db..
Now I want to create the restaurant-side app and whenever an order is inserted into the db the main page should be refreshed and the restaurant must be able to chose if accept or decline the order but I don’t really now how to do this
I’ve tried a useEffect but obviously it fetches data only once, I’ve also tried the setInterval but in my opinion it is inefficient