Created
February 23, 2019 18:08
-
-
Save advorkina/28c85ad17a06ff7e54e86010862ef69d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Came from https://itnext.io/easily-integrate-mobx-into-react-native-app-with-expo-and-react-navigation-29ecf7c14012
setProporty
seems to be a typo :)