re-rxjs / react-rxjs

React bindings for RxJS
https://react-rxjs.org
MIT License
546 stars 18 forks source link

import error when using Subscribe #210

Closed hoclun-rigsep closed 2 years ago

hoclun-rigsep commented 3 years ago
../node_modules/@react-rxjs/utils/dist/utils.es2017.mjs
Attempted import error: 'SUSPENSE' is not exported from '@react-rxjs/core'.
hoclun-rigsep commented 3 years ago

Seems to have been fixed by

npm i @react-rxjs/utils

but the Getting Started docs only say

npm i rxjs @react-rxjs/core

Would you like me to edit docs at that point?

josepot commented 3 years ago

Oh! I see... Yes, you are correct, the docs should either instruct the user to install the utils package or use a Subject rather than using the createSignal util.

A PR that addressed this issue would be super appreciated, yes! Thanks @hoclun-rigsep !

voliva commented 3 years ago

That's strange, we need to understand what went wrong there - It seems like you already had @react-rxjs/utils installed (because the error is originating from that file), and it got fixed by upgrading it?

Do you know what versions of both @react-rxjs/core and @react-rxjs/utils you had when the error happened? that would help a lot to identify the issue.

Installing just rxjs and @react-rxjs/core should be working fine, utils is just an additional package with utility functions that make composing and creating rxjs states easier, but you could use ReactRxJS without them: Most of the operators there are sugar.

But it's true that in the getting started section we're using createSignal, so it would make sense to add it to the docs too, a PR will be much appreciated :D

edit: @josepot ninja'd me 🙈

hoclun-rigsep commented 3 years ago

I'll attempt to reproduce and I'll patch the docs.

hoclun-rigsep commented 3 years ago

I never really followed up on this; do you think there's anything here worth investigating?

josepot commented 2 years ago

@all-contributors please add @hoclun-rigsep for documentation and ideas

allcontributors[bot] commented 2 years ago

@josepot

I've put up a pull request to add @hoclun-rigsep! :tada: