-
-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
Example Code
// STORE
class Todo {
@observable title = "Test";
@action.bound
setTitle(value: string) {
this.title = value;
}
}
// CREATE VIEW MODEL
const model = new Todo();
const viewModel = createViewModel(model);
viewModel.setTitle("Updated Test")
console.log(viewModel.title) // Updated Test
console.log(model.title) // Updated Test
Here when we console the original model we expected title value as "Test" only but actual output is "Updated Test"
package versions:
"mobx": "5.15.0",
"mobx-react": "6.1.4",
"mobx-utils": "5.6.2",
Metadata
Metadata
Assignees
Labels
No labels