Created
May 24, 2016 20:15
-
-
Save hackervera/bf46c15ace6827ce061787b1157e200b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| diff --git a/src/containers/LauchContainer/index.js b/src/containers/LauchContainer/index.js | |
| index 2b66290..c2273f5 100644 | |
| --- a/src/containers/LauchContainer/index.js | |
| +++ b/src/containers/LauchContainer/index.js | |
| @@ -7,9 +7,33 @@ import Container from '@components/Container' | |
| import Title from '@components/Title' | |
| import Link from '@components/Link' | |
| import SpaceRow from '@components/SpaceRow' | |
| +import ListView from 'react-native' | |
| + | |
| +var REQUEST_URL = 'https://raw.githubusercontent.com/facebook/react-native/master/docs/MoviesExample.json'; | |
| class LauchContainer extends Component { | |
| + constructor(props) { | |
| + super(props); | |
| + this.state = {}; | |
| + } | |
| + | |
| + fetchData() { | |
| + fetch(REQUEST_URL) | |
| + .then((response) => response.json()) | |
| + .then((responseData) => { | |
| + this.setState({ | |
| + dataSource: responseData.movies, | |
| + loaded: true, | |
| + }); | |
| + }) | |
| + .done(); | |
| + } | |
| + componentDidMount() { | |
| + //this.fetchData(); | |
| + } | |
| + | |
| render() { | |
| + if (this.state && this.state.dataSource) alert(JSON.stringify(this.state.dataSource)); | |
| return ( | |
| <Container> | |
| <SpaceRow id={123} title="Test Space 1" source={{uri: "https://gohugo.io/img/hugo-logo.png"}} /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment