Created
August 4, 2016 02:32
-
-
Save quantumlicht/2a42e82dd822f9d5ce7e250d33116fdb to your computer and use it in GitHub Desktop.
Redux React-Native App
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, PropTypes } from 'react' | |
import { connect } from 'react-redux' | |
import { | |
View | |
} from 'react-native' | |
import Svg,{ | |
Circle, | |
Ellipse, | |
G, | |
LinearGradient, | |
RadialGradient, | |
Line, | |
Path, | |
Polygon, | |
Polyline, | |
Rect, | |
Symbol, | |
Text, | |
Use, | |
Defs, | |
Stop | |
} from 'react-native-svg' | |
class Remindr extends Component { | |
constructor(props) { | |
super(props) | |
} | |
render() { | |
return ( | |
<View style={{flex: 1, margin: 100}}> | |
<Svg | |
height="100" | |
width="100" | |
> | |
<Circle | |
cx="50" | |
cy="50" | |
r="45" | |
stroke="blue" | |
strokeWidth="2.5" | |
fill="green" | |
/> | |
<Rect | |
x="15" | |
y="15" | |
width="70" | |
height="70" | |
stroke="red" | |
strokeWidth="2" | |
fill="yellow" | |
/> | |
</Svg> | |
</View> | |
) | |
} | |
} | |
function mapStateToProps(state) { | |
return { | |
} | |
} | |
export default connect(mapStateToProps)(Remindr) |
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 { Provider } from 'react-redux' | |
import configureStore from '../configure-store' | |
import App from './app' | |
const store = configureStore() | |
export default class Root extends Component { | |
render() { | |
return ( | |
<Provider store={store}> | |
<App /> | |
</Provider> | |
) | |
} | |
} |
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import { AppRegistry } from 'react-native'; | |
import Root from './src/containers/root' | |
AppRegistry.registerComponent('Remindr', () => Root); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NOTE
the underscores in the filenames denote a "/" to indicate file hierarchy