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
[v2] Timeline for DeepLinks in v2? #3991
Comments
The deep link system in v1 actually is just a simple event library that you can build yourself if you desperately need it. // events.js
import EventEmitter from 'EventEmitter';
export const events = new EventEmitter(); import { events } from './events';
class Screen1 extends React.Component {
componentDidMount() {
events.addEventListener('DeepLink', this.handleDeepLink);
}
handleDeepLink(event) {
const parts = event.link.split('/'); // Link parts
const payload = event.payload; // (optional) The payload
if (parts[0] == 'chats') {
// handle the link somehow, usually run a this.props.navigator command
}
}
}
class Screen2 extends React.Component {
onContactSelected(contactID) {
events.emit('DeepLink', {
link: 'chats/' + contactID,
payload: '' // (optional) Extra payload with deep link
});
}
} |
Will this work when I open the link for example in my email (GMAIL)?. |
i believe this isn't feasible because react native doesn't import node standard library anymore |
Hey guys, as @birkir noted - v1's deeplink system was a very basic pub-sub implementation. As handling events isn't a navigation library's concern we opted to remove it from v2. |
It's really easy with the Linking library from React Native ;) |
Issue Description
Is there an estimated timeline to get deep links working in v2?
The text was updated successfully, but these errors were encountered: