I'm with problem in my project.
Animated Node with tag 7 not exists
type error: expected dynamic type 'double' but had type 'null'
Before rendering this form the app appears the errors from time to time, it is not always that the error appears. I think only when the internet is not very good. But I wanted to be able to handle this error so it did not appear to the user.
My code below.
FormPrincipal.js
import React, { Component } from 'react';
import { View, Text, ScrollView, Alert, BackHandler } from 'react-native';
import RNExitApp from 'react-native-exit-app';
import ScrollableTabView from 'react-native-scrollable-tab-view';
import { Actions } from 'react-native-router-flux';
import axios from 'axios';
import { connect } from 'react-redux';
import { modificaToken, modificaConsultas, modificaScene } from '../actions/AutenticacaoActions';
import FormFaturamento from './FormFaturamento';
import FormListaConsultas from './FormListaConsultas';
class formPrincipal extends Component {
componentWillMount() {
BackHandler.addEventListener('hardwareBackPress', this.handleAndroidBack)
}
componentWillUnmount() {
BackHandler.removeEventListener('hardwareBackPress', this.handleAndroidBack)
}
handleAndroidBack = () => {
if(Actions.currentScene === 'formPrincipal') {
Alert.alert(
'Sair',
'Deseja sair do app?',
[
{ text: 'NÃO', onPress: () => {} },
{ text: 'SIM', onPress: () => RNExitApp.exitApp() },
]
);
return true;
}
}
render() {
return(
<ScrollableTabView>
{this.props.consultas.map( item => <FormListaConsultas tabLabel={item.Grupo} key={item.Grupo} item={item}/>)}
</ScrollableTabView>
)
}
}
const mapStateToProps = state => (
{
token: state.AutenticacaoReducer.token,
consultas: state.AutenticacaoReducer.consultas,
scene: state.AutenticacaoReducer.scene,
listaConsultas: state.AutenticacaoReducer.listaConsultas
}
)
export default connect(mapStateToProps, {modificaToken, modificaConsultas, modificaScene})(formPrincipal);