Skip to content

Instantly share code, notes, and snippets.

@advorkina
Created February 23, 2019 18:08
Show Gist options
  • Save advorkina/28c85ad17a06ff7e54e86010862ef69d to your computer and use it in GitHub Desktop.
Save advorkina/28c85ad17a06ff7e54e86010862ef69d to your computer and use it in GitHub Desktop.
import { inject } from 'mobx-react/native';
// because of the @inject line we will get observableStore to our props
@inject('observableScreenStore')
export default class IWillUpdateYouComponent extends Component<{}, {}> {
// bla bla bla code
importantMethod = () => {
this.props.observableStore.setProporty('Gotcha!');
}
// bla bla bla
}
@williamdes
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment