Here is my code which produces
Warning: LoaderView(...): When calling super() in
LoaderView, make sure to pass up the same props that your component's constructor was passed.
import * as React from "react";
import {ActivityIndicator, Text, View} from 'react-native'
export class LoaderView extends React.Component {
constructor(props) {
super(props)
}
props = {
title: "",
loading: false
}
render() {
if (this.props.loading) {
return <View {...this.props} style={{flex: 1, justifyContent: 'center'}}>
<ActivityIndicator
size={"large"}
animating={true}/>
<Text
style={{textAlign: 'center', fontSize: 20, fontWeight: '500'}}>
{this.props.title}
</Text>
</View>
} else {
return <View {...this.props} style={{flex: 1, justifyContent: 'center'}}>
<Text
style={{textAlign: 'center', fontSize: 20, fontWeight: '500'}}>
{this.props.title}
</Text>
</View>
}
}
}
How to resolve this warning in above code?