I've one method called onChange and it's working as expected on localhost but not on production. Checkout the code below for better understanding:
onChange() {
const someValue = this.props.dispatch(divideTenByFive()) // returns 2 on both local and prod
console.log(someValue) // prints 2 on localhost and undefined on production
console.log(this.props.dispatch(divideTenByFive())) // prints 2 on localhost and undefined on production
return someValue;
}
Is it related to Synchronous/Asynchronous programming? How to fix this for production?
Note: I can't share the actual business logic so I've written divideTenByFive() for better understanding. However, I've tried to provide max details but if you're looking for more info please comment below.
Update: I'm not using any middleware