Skip to content

Conversation

@cassiozen
Copy link
Owner

@cassiozen cassiozen commented Jun 14, 2021

  • Adds access to context from whithin effects
  • Renames update to setContext
  • Changes parameter signature for both Effects and Guards to an object.

In E.g.: Instead of this:

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

this:

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

Closes #33

@github-actions
Copy link

github-actions bot commented Jun 14, 2021

size-limit report 📦

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

@cassiozen cassiozen mentioned this pull request Jun 14, 2021
@cassiozen cassiozen merged commit d7a60c4 into main Jun 14, 2021
@cassiozen cassiozen deleted the newEffectsSignature branch June 14, 2021 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Access context inside effect

2 participants