0

I have a class:

    export default class MyClass {
  constructor(data) {
    this.Value = data;
  }
  @observable Value;
}

I want to be able to do the following

this.myClass = new MyClass();
this.myClass = someData;

I want to be able to override an assignement operator in MyClass so I can do what I need to do with the someData that is passed into to.

Pacman
  • 2,183
  • 6
  • 39
  • 70

0 Answers0