score:0

The error is pretty self-explanatory.

You're trying to pass a variable named mapStateToProps into the connect function but you never defined it.

export default connect(mapStateToProps)(Landingscreen);
//                     ^ this isn't defined anywhere

You need to actually create a function that will map the state to props:

function mapStateToProps(state) {
  // ...
}
export default connect(mapStateToProps)(Landingscreen);

score:0

You should define the function named mapStateToProps before using it:

const mapStateToProps = ( state ) => {
  const someProp = state.get('someProp');
  return {
    someProp
  }
}

score:3

You did not create a mapStateToProps function yet you try to pass it to the connect function.
You should read the DOCS for clarity

For example:

function mapStateToProps(state) {
  return {
    navigation: state.navigation 
  }
}

This will pass the navigation from redux store as a prop to your component so you can access it via props.navigation


Related Query

More Query from same tag