Skip to content

Instantly share code, notes, and snippets.

@ZaneWithSpoon
Created February 3, 2016 05:11
Show Gist options
  • Save ZaneWithSpoon/ebf3426b6aa5b880a262 to your computer and use it in GitHub Desktop.
Save ZaneWithSpoon/ebf3426b6aa5b880a262 to your computer and use it in GitHub Desktop.
view Main {
view.pause()
let test = 'old'
function changeVar(){
test = 'new'
//y u no update?
view.update()
return test
}
<word onClick={() => view.update()}>
click here for update
</word>
<Studio {...{test, changeVar}}/>
}
view Studio {
prop test
prop changeVar
on.props(() => {
console.log('onProps')
})
let newVar = changeVar()
console.log(newVar)
<studio>
{test}
</studio>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment