Skip to content

Instantly share code, notes, and snippets.

@serebano
Created March 17, 2017 02:30
Show Gist options
  • Select an option

  • Save serebano/61d567b1865a434ad53aebf87ab01928 to your computer and use it in GitHub Desktop.

Select an option

Save serebano/61d567b1865a434ad53aebf87ab01928 to your computer and use it in GitHub Desktop.
data = {
state: {
users: {
foo: {name: 'Foo'}
}
}
}
tree = {
state: new Model(data, 'state'),
dummy: new Model({
xxx: [1,2,3]
}),
object: {
a: 1,
b: 2
}
}
state = Tag.create('state')
props = Tag.create('props')
target = state`users.${props`id`}`
user = target.resolve(tree, {
id: 'foo'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment