Last active
May 5, 2017 15:05
-
-
Save kenwheeler/b20ea372efcc52adf905 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
import React from "react"; | |
const RN = React; | |
export const PropTypes = React.PropTypes; | |
RN.StyleSheet = { | |
create: (style) => style | |
}; | |
const createComponent = (type) => { | |
return React.createClass({ | |
displayName: type, | |
propTypes: { | |
children: React.PropTypes.node | |
}, | |
render() { | |
return <div {...this.props}>{this.props.children}</div>; | |
} | |
}); | |
}; | |
RN.View = createComponent("View"); | |
RN.Text = createComponent("Text"); | |
RN.ActivityIndicatorIOS = createComponent("ActivityIndicatorIOS"); | |
RN.Image = createComponent("Image"); | |
RN.TouchableHighlight = createComponent("TouchableHighlight"); | |
RN.ScrollView = createComponent("ScrollView"); | |
export default RN; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@joemckie you mean:
Right?