jss: [plugin-observable] Observables not working as expected

Hi again 😃

Observables aren’t working as expected. In particular, I’ve a TC39 implementation of Observables which is not being interpreted correctly.

The problem would seem to be the isObservable function, which adds this to jss:

  var symbolObservable = lib;

  var isObservable = (function (value) {
    return value && value[symbolObservable] && value === value[symbolObservable]();
  });

Here’s some command line output that’s illuminating:

>>> Symbol.observable === symbolObservable
false
>>> symbolObservable.default === Symbol.observable
true

It’s possible there’s some weird things going on with the build process on my end (perhaps I need some webpack-commonjs bridge), but I didn’t see any tests in jss that demonstrate the use of Symbol.observable proper, so I can’t easily eliminate the possibility that it’s a jss issue.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 24 (22 by maintainers)

Most upvoted comments