mobxjs / mobx-angular

The MobX connector for Angular.
MIT License
483 stars 59 forks source link

Now able to pass all options to both reaction and autorun directives. #129

Closed OmerGronich closed 3 years ago

OmerGronich commented 3 years ago
adamkleingit commented 3 years ago

Hi @OmerGronich - thanks for following through with this. That's not good because it's a breaking change to the API. Is it possible to add the options as a second input?

OmerGronich commented 3 years ago

Hi @OmerGronich - thanks for following through with this. That's not good because it's a breaking change to the API. Is it possible to add the options as a second input?

Yes I thought this would be a problem. I'll try to figure it out and submit another pull request soon.

OmerGronich commented 3 years ago

Hi @OmerGronich - thanks for following through with this. That's not good because it's a breaking change to the API. Is it possible to add the options as a second input?

Fixed it so in the mobxReaction directive you can now pass a second parameter after the function, called options.

The mobxAutorun directive still accepts only one input

Let me know if this is ok