mapstatetoprops is run before api function in functional code example
Example: redux connect
//Connects your component to Redux-store
export default connect(mapState, mapDispatch)(Component)
//Connects your component to Redux-store
export default connect(mapState, mapDispatch)(Component)