nx-js / observer-util

Transparent reactivity with 100% language coverage. Made with ❤️ and ES6 Proxies.
MIT License
1.2k stars 94 forks source link

2 modules, 1 observable #9

Closed mrjjwright closed 7 years ago

mrjjwright commented 7 years ago

If 2 different modules require this lib like so

const observer = require("@nx-js/observer-util"); //module-a

const observer = require("@nx-js/observer-util"); //module-b

can they both observe the same observable? It doesn't seem like it, since currentObserver would be different in both scenarios. I was forced to pass a singe observer object around. This seems like a big limitation, am I missing something obvious, or is there an elegant way you handle this inside nx-framework?

mrjjwright commented 7 years ago

Never mind, I am being silly it works.