{this.state.isFetch&&<View style={navigationPostcards}>
<TouchableOpacity onPress={this._backwardPostcards} style={arrowContainer}>
<Image source={require('./src/components/uikit/images/arrowBack.png')} style={arrow} />
</TouchableOpacity>
<TouchableOpacity onPress={this._nextPostcards} style={arrowContainer}>
<Image source={require('./src/components/uikit/images/arrowNext.png')} style={arrow} />
</TouchableOpacity>
<View style={pagesCountContainer}>
<Image source={require('./src/components/uikit/images/pagesCountIcon.png')} style={pagesCountIcon} /><Text style={pageCountInfo}>{page + ' / ' + pageMax}</Text>
</View>
</View>}
_getPostcards () {
try {
this.setState({isFecth:true})
const url = domain + '?app_id='+ app_id +'&category='+ category +'&page=' + this.state.page
return fetch(url)
.then((response) => response.json())
.then((responseJson) => {
console.log(responseJson)
this.setState({ data: responseJson.photos, pageMax: responseJson.pages })
this.setState({isFecth:false}) //<--------
})
.catch((error) =>{
console.error(error);
this.setState({isFecth:false}) //<--------
});
} catch (e) {
throw e
this.setState({isFecth:false}) //<--------
}
}
Import your .svg file inside a React component:
import Logo from "./logo.svg";
this.props.navigation.navigate('Details', {
itemId: 86,
otherParam: 'anything you want here',
});
const INJECTED_JAVASCRIPT = `(function() {
document.body.style.background = color;
})();`;
<WebView
source={{ uri: 'https://facebook.github.io/react-native' }}
injectedJavaScript={INJECTED_JAVASCRIPT}
onMessage={this.onMessage}
/>