What's the difference between join
and all
in Redux Saga?
function* fetchUserData(userId) {
const postsTask = yield fork(fetchAlbums, userId)
const albumsTask = yield fork(fetchPosts, userId)
yield join([postsTask, albumsTask])
}
function* fetchUserData(userId) {
const postsTask = yield fork(fetchAlbums, userId)
const albumsTask = yield fork(fetchPosts, userId)
yield all([postsTask, albumsTask])
}
Seems that both of them just syncing several tasks.