- Introduction
- Introduction to MobX
- 2. Core API
- Advanced API
- Best Practices For Large Apps
- How does MobX work?
- Tips & Tricks
- 6.1. DevTools
- 6.2. ES5 / ES6 / TypeScript syntax
- 6.3. Tracking state changes
- 6.4. Performance considerations
- 7. Resources
- 8. Frequently Asked Questions
- Published with GitBook
MobX
fastArray
Deprecated in 2.0, use observable(asFlat([]))
instead
fastArray
creates observable arrays, similar to observable([])
with two differences:
- The indices of arrays created by
fastArray
are not enumerable, soObject.keys(array)
will always return an empty set.
This means that for .. in
loops won't work on them (but normal for ;;
loops will).
This reduces the overhead of adding new items to to an observable array significantly.
- Arrays created by using
fastArray
will apply the flat modifier by default; values added to the array will not be made reactive automatically.
fastArray
will become the default behavior in the next major release. For more info on observable arrays, see: observable.