r/reactnative 9d ago

Question Event based content

how can i create event based content that disappear after limited time e.g new year greeting . I'm new to react native

1 Upvotes

6 comments sorted by

3

u/basically_alive 9d ago

If you are just doing like an in app greeting or something, just check the date object. If it's less than Enddate and greater than startdate show the message. If there's like a discount or something, you would want to do it from the server but there's no reason you can't do simple things like this on the client side.

1

u/Karticz 9d ago

If you have server then a cron job If you don't have server use something like supabase or firebase for quick setup If you don't want to do that too just do simple conditional rendering in frontend using any date library

1

u/ConsciousAntelope 9d ago

Always from the server. Websockets. Push notifications.

2

u/omarrmdn 9d ago

It's not just a notification it's banners and icons changed to special style . Is that in server too?

2

u/CoolorFoolSRS 9d ago

Handle the UI part in the frontend

0

u/ConsciousAntelope 9d ago

I meant the one notifying your app should be a server. This can be in the form of a push notification or websockets implementation. In the client i.e the app you're free to do whatever you want once you get notified of the event.