I am using redux-saga middle-ware. I have one login screen where user is providing email and password. Login failure redux code looks like this.
export const failure = (state) =>
state.merge({ fetching: false, error: true, login: {} })
What is best practise to display error message ("Invalid email/password") to user.
Issue: suppose I am using error in state to display message but after unsuccessful login if there is any change in state because of some other action my code again displays the same error message.