accessing unmemoized getter properties of a class model
bench/property-access.benchmark.ts
0%
14.9 µs14.9 µs
accessing memoized getter properties of a class model
bench/property-access.benchmark.ts
-1%
11.2 µs11.3 µs
accessing unmemoized null property of a class model
bench/property-access.benchmark.ts
-2%
10.8 µs11 µs
Ignored
mobx-state-tree
bench/cross-framework.benchmark.ts
Ignored
0%
1.5 ms1.5 ms
plain mobx
bench/cross-framework.benchmark.ts
Ignored
-1%
282.4 µs284.7 µs
mobx-quick-tree types.model
bench/cross-framework.benchmark.ts
Ignored
+1%
155.1 µs154.2 µs
plain es6
bench/cross-framework.benchmark.ts
Ignored
+1%
16.1 µs16 µs
Commits
Click on a commit to change the comparison range
Base
accepts-undefined
330abed
-40.31%
Add support for acceptsUndefined: false to safe references
MST proper supports an `acceptsUndefined: false` on safe references that automatically prunes invalid references from parent maps and arrays. I wanna use it in Gadget but noticed that it no worky -- we pass the option through to observable instances fine but didn't do anything with it in readonly instances. This adds handling for the special case, which requires arrays and maps to look at the child type, and if it is a safe reference with the option set, omit unresolved entries from the result. Woop woop.
330abed
1 year ago
by airhorns
×2.2
Add support for acceptsUndefined: false to safe references
MST proper supports an `acceptsUndefined: false` on safe references that automatically prunes invalid references from parent maps and arrays. I wanna use it in Gadget but noticed that it no worky -- we pass the option through to observable instances fine but didn't do anything with it in readonly instances. This adds handling for the special case, which requires arrays and maps to look at the child type, and if it is a safe reference with the option set, omit unresolved entries from the result. Woop woop.