Tracked built-ins

In this video we'll explore the tracked-built-ins package.

Summary

The tracked-built-ins package allows us use native JavaScript objects while tracking all the ways that they can change.

This means we can treat our arrays as mutable objects and tracked-built-ins will automatically propagate our changes to templates and computed properties.

import { tracked } from "tracked-built-ins";

class MyComponent extends Component {
  items = tracked([])

  @action addListItem() {
    this.items.push(randomCatUrl());
  }
}

Questions?

Send us a tweet:

Or ask us in Inside EmberMap, our private Slack workspace for subscribers.