I am working on how to display warning message on react native and found console.warn and console.error works very well as per my requirement. but only issue is those alert box remains unless closed by user. can you guys suggest how to let those alert box disappear by itself automatically after passing 3 second.
Below is the default code to display console warning on screen
console.warn("This is a test warning");
and current warning on display shown as below and user need to click on cross sign to close this alert box , my request is how can I let it disappear automatically after ew second .
As said by @Engin. You are misusing the purpose of console.warn and most proabaly what you need is a snackbar feature that is available in Android native app development using java. So i would suggest you to try snackbar either from react native paper or use from npm .
for more info in npm refer this link
for more info on react native paper use this link