a React newbie having some problems passing states and functions from the parent component ( App in this case) and access from child components ( Main in this case). I'm sure these are one or two really simple mistakes, where did I work?
Here is the project structure:
App |__ Rootstack | |__Favorites |__Main
And here is the stripped-down code:
class Main extends React.Component { render() { return ( <View> <Text>{this.props.favoritesList.length}</Text> <Card> onSwiped={() => {this.props.updateArray}}
The error I get is
- any idea? Thanks in advance!
source share