cssinjs / cssinjs/jss

[plugin-observable] Observables not working as expected

Open
#735 24 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
7.1k
Forks
386
PR merge metrics
No merged PRs in 30d

Description

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`:

```js
var symbolObservable = lib;

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

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

```js
>>> 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.