2.0.0 • Published 2 years ago

ember-deep-tracked v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ember-deep-tracked

npm version CI

Deep tracking using proxies for complex objects for when you want everything to be reactive, at the cost of performance.

This is not recommended for performance-sensitive situations such as rendering a table from a large data set where updates to that data set are frequent. Even without updates, deeply tracking will increase initial-render time.

Compatibility

  • Ember.js v3.25+
  • TypeScript v4.5+
  • ember-auto-import v2+
  • Proxy support

Installation

npm install ember-deep-tracked
# or
yarn add ember-deep-tracked
# or
pnpm add ember-deep-tracked
# or
ember install ember-deep-tracked

Usage

import { tracked } from 'ember-deep-tracked';

class Foo {
  @tracked obj = { bar: 2 };
}

or in a component:

import { tracked } from 'ember-deep-tracked';
import Component from '@glimmer/component';

export default class Foo extends Component {
  @tracked obj = { bar: 2 };
}
{{this.obj.bar}} <- automatically updates when "obj.bar" changes

using this decorator form will track the reference, like tracked from @glimmer/tracking does, and then also deeply tracks the value.

the entire object and any sub object can be swapped with other objects and they'll be automatically tracked.

import { deepTracked } from 'ember-deep-tracked';

is also available, and is an alias of tracked

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

1.3.14

2 years ago

2.0.0

2 years ago

1.3.13

2 years ago

1.3.12

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.10

2 years ago

1.3.11

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.0

2 years ago

1.2.17

2 years ago

1.2.16

3 years ago

1.2.15

3 years ago

1.2.14

3 years ago

1.2.13

3 years ago

1.2.12

3 years ago

1.2.11

3 years ago

1.2.10

3 years ago

1.2.9

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago