mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
16 lines
299 B
Plaintext
16 lines
299 B
Plaintext
<script>
|
|
module.exports = {
|
|
onInput: function(input) {
|
|
this.state = {
|
|
name: input.name
|
|
};
|
|
},
|
|
setName: function(newName) {
|
|
this.setState('name', newName);
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<div>
|
|
Hello ${state.name}!
|
|
</div> |