Skip to content
#

microstates

Here are 6 public repositories matching this topic...

Language: All
Filter by language
microstates
jeffutter
jeffutter commented Oct 31, 2018

In traditional 'state machines' usually, there is a way to disallow a transition. Perhaps based on business rules, consider the example of a cash register state machine.

You may have a cash register that starts with $100 in it. You may have a 'withdraw' action that lets you take money out. How would you prevent the following scenario:

CashRegister
  .balance.withdraw(20)
  .
taras
taras commented Nov 27, 2018

There is nothing really tricky about using Microstates with Ember Concurrency, but we do want to make this clearer with a good example. For all intents and purposes, Microstates behave like Computed Properties. You can write values to them and the result will be computed synchronously when the value is read. Microstates also debounce no-op write operations.

To use Microstates with EC, you woul

Improve this page

Add a description, image, and links to the microstates topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the microstates topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.