Created
August 16, 2016 18:43
-
-
Save togakangaroo/9b5cb370a6808a8d093e214cb63f8f0e to your computer and use it in GitHub Desktop.
nojsx
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
import React, { Component, createFactory } from 'react' | |
import { AppRegistry, StyleSheet, Text, View } from 'react-native' | |
const view = createFactory(View) | |
const text = createFactory(Text) | |
const styles = { | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
alignItems: 'center', | |
backgroundColor: '#F5FCFF', | |
}, | |
welcome: { | |
fontSize: 20, | |
textAlign: 'center', | |
margin: 10, | |
}, | |
} | |
const ReactNativeWeb = () => | |
view({style: styles.container}, | |
text({style:styles.welcome}, "Welcome to React Native Tester"), | |
text({style:styles.instructions}, "initial code is in index.web.js") | |
) | |
AppRegistry.registerComponent('ReactNativeWeb', () => ReactNativeWeb) | |
AppRegistry.runApplication('ReactNativeWeb', { rootTag: document.getElementById('react-app') }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment