mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
15 lines
271 B
JavaScript
15 lines
271 B
JavaScript
module.exports = {
|
|
onInput: function (input) {
|
|
this.state = {
|
|
name: input.name,
|
|
age: input.age,
|
|
};
|
|
},
|
|
setName: function (newName) {
|
|
this.setState("name", newName);
|
|
},
|
|
setAge: function (newAge) {
|
|
this.setState("age", newAge);
|
|
},
|
|
};
|