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 { compose } from "redux"; | |
import { compose } from "react-apollo"; | |
// your InfoScreen implementation | |
// bottom of file: | |
export default compose( | |
connect(mapStateToProps, mapActionCreators), | |
withLoadingScreen | |
)(InfoScreen) |
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 * as React from "react"; | |
import hoistNonReactStatics from 'hoist-non-react-statics'; | |
import { View, ActivityIndicator } from "react-native"; | |
const withLoadingScreen = (size = "small") => WrappedComponent => { | |
class LoadingScreen extends React.PureComponent { | |
render() { | |
if (this.props.loading) return <ActivityIndicator size={size} color="white" /> | |
return <WrappedComponent {...this.props} />; | |
} |
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 * as React from "react"; | |
import hoistNonReactStatics from 'hoist-non-react-statics'; | |
import { View, ActivityIndicator } from "react-native"; | |
const withLoadingScreen = WrappedComponent => { | |
class LoadingScreen extends React.PureComponent { | |
render() { | |
if (this.props.loading) return <ActivityIndicator size="small" color="white" /> | |
return <WrappedComponent {...this.props} />; | |
} |
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 * as React from "react"; | |
import { View, ActivityIndicator } from "react-native"; | |
const withLoadingScreen = WrappedComponent => { | |
return class LoadingScreen extends React.PureComponent { | |
render() { | |
if (this.props.loading) return <ActivityIndicator size="small" color="white" /> | |
return <WrappedComponent {...this.props} />; | |
} | |
}; |
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
class InfoScreen extends React.PureComponent { | |
render() { | |
if (this.props.loading) return <ActivityIndicator /> | |
return ( | |
<View style={styles.container}> | |
<Text>Hi</Text> | |
</View> | |
) | |
} | |
} |
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' | |
import { View, Text, StyleSheet } from 'react-native' | |
const Label = ({ label }) => ( | |
<View style={styles.container}> | |
<Text style={styles.label}>{label}</Text> | |
</View> | |
) | |
const styles = StyleSheet.create({ |
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
type User = { | |
id: ID! | |
first_name: String | |
last_name: String | |
email_verified: Boolean! | |
} | |
input UpdateUserInput { | |
first_name: String | |
last_name: String |
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
open BsReactNative; | |
let component = ReasonReact.statelessComponent("Label"); | |
let styles = | |
StyleSheet.create( | |
Style.( | |
{ | |
"container": | |
style([ |
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
{ | |
"name": "altos-react-native", | |
"reason": {"react-jsx" : 2}, | |
"bsc-flags": ["-bs-super-errors"], | |
"package-specs": [{ | |
"module": "commonjs", | |
"in-source": true | |
}], | |
"suffix": ".bs.js", | |
"namespace": true, |
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
const Layout = () => ( | |
<ScrollView | |
contentContainerStyle={{ | |
flexGrow: 1, | |
justifyContent: 'space-between' | |
}}> | |
<Row /> | |
<Row /> | |
<Row /> | |
<Row /> |