Selection
Make a Selection
// create a Unit
const preferencesUnit = new DictUnit({initialValue:
{color: 'blue', music: 'EDM', game: 'GTA5'}
})
// make a selection
// the 'select' method takes path as it's params
const musicPreference = preferencesUnit.select('music')Static Value Access
// access the value at the selected path
console.log(musicPreference.value())
// logs 'EDM' immediatelyReactive Value Access
Last updated
Was this helpful?