Mmmm, so... sub 100MB for a bundler + compiler + etc?
77MB is nothing, and if you care about this, you're caring about the wrong things.
Exactly
Deleted Comment
Deleted Comment
'Extremely minimal' is hyperbole and 'easy-to-use' is subjective. I disagree with this as an absolute statement. I think there's a trade off, and it potentially harms onboarding for some teams, see my sibling-ish comment.
> it's all of a few hundred lines of code
I hear this a lot, but it reminds me of folks praising Lisp for its simplicity - it may be 'simple' but many people have a hard time understanding it.
Maybe it's not for every app, but goes into this here: https://medium.com/@matheusml/great-question-bryan-waddingto...
function myAction () {
return {
type: 'MY_ACTION',
payload: someApiCall(),
}
}
And that will dispatch `MY_ACTION_PENDING`, then `MY_ACTION_FULFILLED` or `MY_ACTION_REJECTED`. Soon you'll be able to write your payload as an `async function`: function myAction () {
return {
type: 'MY_ACTION',
async payload (dispatch) {
const apiResult = await someApiCall()
dispatch(anotherActionCauseWhyNot(apiResult))
return apiResult
}
}
}
I'm sure there's more to redux-saga, but this article doesn't do a great job of presenting that.