-
Notifications
You must be signed in to change notification settings - Fork 1.9k
add more information about deep link for expo projects #332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploy preview for react-navigation ready! Built with commit cdb636d |
docs/deep-linking.md
Outdated
|
||
const MainApp = () => <SimpleApp uriPrefix={prefix} />; | ||
``` | ||
|
||
## Set up with Expo projects | ||
|
||
you need to specify a scheme for your app. You can register for a scheme in your `app.json` by adding a string under the scheme key: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should capitalize the first word in the paragraph, so "You need" rather than "you need"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦🏾♂️
sorry haha
@@ -40,12 +40,50 @@ const SimpleApp = createAppContainer(createStackNavigator({...})); | |||
// on Android, the URI prefix typically contains a host in addition to scheme | |||
// on Android, note the required / (slash) at the end of the host property | |||
const prefix = Platform.OS == 'android' ? 'mychat://mychat/' : 'mychat://'; | |||
// in Expo projects you can do the following to get the URI prefix | |||
const prefix = Expo.Linking.makeUrl('/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might want to have an entirely separate section for expo projects / vanilla react native projects, and just repeat this entire code example in both sections but with the prefix line that is relevant to the platform. it's a bit cleaner when you can just pick the section relevant to you and follow that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, thanks! I'll do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks as always :) added a couple of comments
done :) |
💯 |
added a bit more clarification on the expo stuff :) |
cool! thanks for add that awesome clarification. :) |
No description provided.