What is the mental model of redux-saga?

Technology CommunityCategory: ReduxWhat is the mental model of redux-saga?
VietMX Staff asked 3 years ago

The mental model is that a saga is like a separate thread in your application that’s solely responsible for side effects. redux-saga is a redux middleware, which means this thread can be started, paused and cancelled from the main application with normal redux actions, it has access to the full redux application state and it can dispatch redux actions as well.