Last active
January 29, 2017 11:46
-
-
Save pavsidhu/84ebb24520a128d1d7fdfc8947028d6f to your computer and use it in GitHub Desktop.
Redux example
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 React, {Component} from 'react' | |
import {AppRegistry} from 'react-native' | |
import {Provider} from 'react-redux' | |
import App from './app' | |
import configureStore from './store.js' | |
const store = configureStore() | |
class MyCounterApp extends Component { | |
render() { | |
return( | |
// <Provider> allows us to access the store for dispatching actions and receiving data from | |
// the state in it's children i.e. <App/> | |
<Provider store={store}> | |
<App/> | |
</Provider> | |
) | |
} | |
} | |
AppRegistry.registerComponent('MyCounterApp', () => MyCounterApp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment