Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@preact/signals-react@2.0.0 not re-exporting useSignals #473

Closed
JonAbrams opened this issue Dec 22, 2023 · 9 comments
Closed

@preact/signals-react@2.0.0 not re-exporting useSignals #473

JonAbrams opened this issue Dec 22, 2023 · 9 comments
Labels

Comments

@JonAbrams
Copy link

JonAbrams commented Dec 22, 2023

According to the docs, I should be able to import { useSignals } from '@preact/signals-react', but since useSignals is not re-exported, I need to do this instead: import { useSignals } from '@preact/signals-react/runtime'.

JonAbrams added a commit to JonAbrams/signals that referenced this issue Dec 22, 2023
JonAbrams added a commit to JonAbrams/signals that referenced this issue Dec 22, 2023
@XantreDev
Copy link
Contributor

I think it's better to just replace @preact/signals-react -> @preact/signals-react/runtime in README.md

@XantreDev
Copy link
Contributor

#472 Like that

@JonAbrams
Copy link
Author

Seems inconsistent to re-export useSignal but not useSignals from the same place.

@XantreDev
Copy link
Contributor

XantreDev commented Dec 22, 2023

What is the problem to import it from runtime? It's logically little bit different stuff

@JonAbrams
Copy link
Author

JonAbrams commented Dec 22, 2023 via email

@rschristian
Copy link
Member

Cleanliness isn't so much relevant as intended default usage -- useSignals being exported from a subpath (/runtime) would indicate it's more of an "opt-in" than a default.

Not 100% sure what Andre had meant for though. @andrewiggins friendly ping if you're not too busy with holiday stuff

@dotte1

This comment was marked as duplicate.

@Merri
Copy link

Merri commented Feb 15, 2024

I think it's better to just replace @preact/signals-react -> @preact/signals-react/runtime in README.md

Just noting here that readme on npm site still shows outdated documentation.

@XantreDev
Copy link
Contributor

I think it's better to just replace @preact/signals-react -> @preact/signals-react/runtime in README.md

Just noting here that readme on npm site still shows outdated documentation.

It will be updated with the next release. It is possible to release it with only changes in readme, too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants