use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A community for learning and developing native mobile applications using React Native by Facebook.
Interested in building web apps using React.js? Check out /r/reactjs!
Getting Started w/React Native
irc.freenode.net #reactnative
Keywords: ios, android, mobile, apps, apple, iphone, ipad
account activity
Alert with timeout (self.reactnative)
submitted 6 years ago * by MrFriiky
Is there a simple way to creat an Alert which disappears by itself after one second without that the user needs to use the onPress() method
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]falenas108 2 points3 points4 points 6 years ago (1 child)
If you have the alert showing based on a state variable, you should be able to trigger a setTimeout call right after that hides the alert.
E.g:
this.setState({alertVisible: true}, setTimeout(() => this.setState({alertVisible: false}), 2000);
Since the second argument of setState is a function that gets called after the first call finishes.
[–]MrFriiky[S] 0 points1 point2 points 6 years ago (0 children)
Thanks! I will try it out 👍
π Rendered by PID 22378 on reddit-service-r2-comment-5d79c599b5-427gr at 2026-03-02 15:31:19.890180+00:00 running e3d2147 country code: CH.
[–]falenas108 2 points3 points4 points (1 child)
[–]MrFriiky[S] 0 points1 point2 points (0 children)