2

What is the difference between mobx's createTransformer and mobx-utils computedFn?

Sometimes there is overlap between things in mobx and mobx-utils (ie whenWithTimeout) but when I've seen that in the past the later has been marked deprecated. Looking into the implementation of computedFn, it seems like it could be doing something additional to observe the arguments passed into the computedFn() result. I'm not sure though.

https://mobx.js.org/refguide/create-transformer.html and https://github.com/mobxjs/mobx-utils#computedfn

Frank Schwieterman
  • 24,142
  • 15
  • 92
  • 130

1 Answers1

2

From https://github.com/mobxjs/mobx-utils/issues/199

createTransformer doesn't need a 'host' to store it's state in. If you can leverage computedFn, I would.

flipchart
  • 6,548
  • 4
  • 28
  • 53