import React, { Component } from 'react'; import { StyleSheet, Button, View, TextInput, Animated, Image, requireNativeComponent, } from 'react-native'; import { createStackNavigator } from 'react-navigation'; // import { createStackNavigator } from './react-navigation/react-navigation'; export const LifecycleAwareView = requireNativeComponent( 'RNSLifecycleAwareView', null ); const IMGS = [ require('./img/dawid-zawila-628275-unsplash.jpg'), require('./img/dawid-zawila-715178-unsplash.jpg'), require('./img/janusz-maniak-143024-unsplash.jpg'), require('./img/janusz-maniak-272680-unsplash.jpg'), ]; const Background = ({ index }) => ( ); class DetailsScreen extends React.Component { static navigationOptions = ({ navigation }) => { return { title: 'Details screen #' + navigation.getParam('index', '0'), }; }; animvalue = new Animated.Value(0); rotation = this.animvalue.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg'], }); state = { count: 1, text: '' }; componentDidMount() { Animated.loop( Animated.timing(this.animvalue, { toValue: 1, duration: 1000, useNativeDriver: false, }) ).start(); setInterval(() => this.setState({ count: this.state.count + 1 }), 500); } render() { const index = this.props.navigation.getParam('index', 0); return (