Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • +1 for markRaw, will try that. Not sure about using reactive(new Foo()) as the real Foo also uses computed, watch etc. in its constructor. Commented Jun 7, 2022 at 12:21
  • @Greendrake Then it probably doesn't need to be a class at all because it won't benefit from oop that much, composition is fp-oriented. reactive is for classes that weren't specifically designed as reactive. Commented Jun 7, 2022 at 12:31
  • Foo represents a data record. It does extend another class which provides stuff like triggering and listening to events (and, potentially, persistence in remote store etc.). So, there is a good use of OOP here. Not sure why composition necessarily needs to be deemed fp-oriented if it works with OOP just fine. Commented Jun 7, 2022 at 12:39