For example, if you read this section in the redux-saga documentation documentation, there is an example related to an input stream that looks like this :.
function* loginFlow() {
while (true) {
yield take('LOGIN')
yield take('LOGOUT')
}
}
As said:
LoginFlow Saga more clearly conveys the expected sequence of actions. He knows that a LOGIN action always follows a LOGOUT action, and that a LOGOUT always follows a LOGIN
Does LOGOUT always follow LOGIN? I do not think so. For example, when a user logs into a website once, as usual, the session will be stored in the website’s cookies and when the user visits the website again, how will the loginFlow saga catch the LOGOUT action?
, , , . , "LOGOUT", , , -? . .
- , ?
.