cassiozen / useStateMachine

The <1 kb state machine hook for React
MIT License
2.38k stars 47 forks source link

New param signature for effects & guards #48

Closed cassiozen closed 3 years ago

cassiozen commented 3 years ago

In E.g.: Instead of this:

effect(_, update, _, context) {
    // ...
}

this:

effect({setContext, context}) {
    // ...
}

Closes #33

github-actions[bot] commented 3 years ago

size-limit report 📦

Path Size
dist/usestatemachine.cjs.production.min.js 411 B (+4.85% 🔺)
dist/usestatemachine.esm.js 452 B (+5.12% 🔺)