Skip to content

Instantly share code, notes, and snippets.

@ger86
Created December 19, 2018 08:36
Show Gist options
  • Save ger86/1614a1ec98fb950a80e41c3ac55cd9b4 to your computer and use it in GitHub Desktop.
Save ger86/1614a1ec98fb950a80e41c3ac55cd9b4 to your computer and use it in GitHub Desktop.
export default class Share extends Component {
....
async componentDidMount() {
try {
const { value } = await ShareExtension.data();
this.setState({
value
});
configureStore(store =>
initApp(store).then(() => {
// dispatch, call an api method... whatever
})
).catch(error => this.setState({ error }));
} catch (error) {
this.setState({ error });
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment