Skip to content
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

The Example doesn't work #14

Open
klaussa opened this issue Feb 22, 2017 · 2 comments
Open

The Example doesn't work #14

klaussa opened this issue Feb 22, 2017 · 2 comments

Comments

@klaussa
Copy link

klaussa commented Feb 22, 2017

Hi. Apparently the example provided updates the store, but the store doesn't updates the view.
Not sure what to do.

@FlaviooLima
Copy link

Did you test it in android or iOS?

@yusufnugroho
Copy link

Hi @Euandrei , You can add observer and import 'observer'

import {observer} from 'mobx-react'

const Counter = observer(({store}) => <View style={styles.container}> <Text style={styles.welcome}> Welcome to React Native Reactive! </Text> <Text>Counter: {store.counter}</Text> <Text>Total clicks: {store.total}</Text> <Button onPress={store.increase}>+</Button> <Button onPress={store.decrease}>-</Button> </View>)

It work for Me, hope this will solve your problem.
whatsapp image 2017-12-06 at 15 37 08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants