To restate the exposition from @rwjblue above… The mut helper returns a mutable object which is an object that responds to update. The action helper knows about these objects and knows to call update (passing in the new value) when given a mutable object .

This is a great shorthand that enables us to write a LOT less boilerplate code, but does require a little bit of understanding so that we don’t confuse each other.

The above information was shamelessly stolen from the EmberJS Community Slack. If you’d like to participate join by going here: Ember Community Slack Invite Page to get your invite.

Today I Learned is an open-source project by
Hashrocket
that exists to catalogue the sharing & accumulation of knowledge
as it happens day-to-day. Posts have a 200-word limit, and
posting is open to any Rocketeer as well as selected friends of
Hashrocket. We hope you enjoy learning along with us.