-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
data bindingEverything related to data bindingEverything related to data bindingoptimizationBecause speed, memory consumption, and bundle size are importantBecause speed, memory consumption, and bundle size are important
Milestone
Description
This replace/shim JS Array, Map, and Set with nusa/std Vector, Map, Set.
import { Vector as Vec, Map, Set } from "//esm.run/nusa/std/collections"
export default {
coins = new Vec<number>()
makets = new Map<string, number>()
symbols = new Set<string>()
shuffleLastCoin() {
console.debug("previous last coin", this.coins.at(-1))
this.coins.setAt(-1, dice([100, 300], [10, 50]))
}
}Yes, indexing operator (i.e arr[i]) is not reactive and there is no way to override/overload it in JS. That's why the name is Vector, not Array.
Metadata
Metadata
Assignees
Labels
data bindingEverything related to data bindingEverything related to data bindingoptimizationBecause speed, memory consumption, and bundle size are importantBecause speed, memory consumption, and bundle size are important
Projects
Status
No status