You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 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"
Example Code
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",
The text was updated successfully, but these errors were encountered: