Do not use this with a button
See original GitHub issueAccording to the Apple Developer guidelines
Because this method may or may not present an alert, it’s not appropriate to call it in response to a button tap or other user action.
I would suggest including this in the README just so it’s explicit.
This had me tapping my head for some time trying to figure out why it was failing to show in my app, even though it worked in development. Well, folks, if anyone else is having this issue, that’s why. However, do not despair, there is a workaround:
import {
Linking,
Platform,
} from 'react-native';
const APP_STORE_LINK = `itms-apps://itunes.apple.com/app/${IOS_APP_ID}?action=write-review`;
const PLAY_STORE_LINK = `market://details?id=${ANDROID_APP_ID}`;
const STORE_LINK = Platform.select({
ios: APP_STORE_LINK,
android: PLAY_STORE_LINK,
});
export default {
requestReview: () => Linking.openURL(STORE_LINK),
};
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:6 (3 by maintainers)
Top Results From Across the Web
When Is A Button Not A Button? - Smashing Magazine
No, but you can always start with a button for almost any element that can be clicked or interacted with in a similar...
Read more >Using <a> instead of <button> - any instances where this is ...
Use an a tag when you want to navigate to a new page or an external resource i.e. links. Use a button tag...
Read more >Stop Using Buttons as Links - YouTube
Despite what CSS would have you believe, buttons, spans, and anchors are not the same when it comes to understandable functionality.
Read more >The Button element - HTML: HyperText Markup Language
The <button> HTML element is an interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive ...
Read more >When To Use The Button Element | CSS-Tricks
Button is a Form Element · Buttons can have content · Let's consider: “if a button doesn't have a meaningful href, it's a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jnrepo no, this flag is only wheter the API itself is available.
Updated readme further and added example for button usage.