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

HOC replacement hooks are not exported #4884

Closed
vjee opened this issue Oct 29, 2021 · 11 comments · Fixed by #4886
Closed

HOC replacement hooks are not exported #4884

vjee opened this issue Oct 29, 2021 · 11 comments · Fixed by #4886
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet

Comments

@vjee
Copy link
Contributor

vjee commented Oct 29, 2021

It seems useAsync, useCreatable and useStateManager are not exported at the moment while in the upgrade guide they are advertised as replacements for the preciously exported HOCs.

Can these exports be added?

@vjee vjee added the issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet label Oct 29, 2021
@Akridian
Copy link
Contributor

Faced same issue.

@Akridian Akridian mentioned this issue Oct 29, 2021
@Akridian
Copy link
Contributor

Akridian commented Oct 29, 2021

Made the PR. It will be nice if changes will get their way to a patch ASAP.

@Methuselah96
Copy link
Collaborator

Just to clarify, the old HOCs weren't exported from the main entry-point either from what I can tell.

@vjee
Copy link
Contributor Author

vjee commented Oct 29, 2021

I'm not sure about manageState but the other two could be imported like so:

import { makeAsyncSelect } from 'react-select/async';
import { makeCreatableSelect } from 'react-select/creatable';

This matches up with your review comment perfectly :)

@Akridian
Copy link
Contributor

Just to clarify, the old HOCs weren't exported from the main entry-point either from what I can tell.

According current docs (outdated a bit BTW) they were exported from corresponding entries. Changed the PR respectively.

image

@Methuselah96
Copy link
Collaborator

Yeah, I guess I was only thinking of manageState not being exported then.

@Akridian
Copy link
Contributor

I personally use useStateManager to reimplement AsyncSelect with custom logic for preselected value (instead of useAsync).

Currently you can import it directly from source code and it works locally, but when new component is imported in other project babel goes mad. 🤣

@Akridian
Copy link
Contributor

Akridian commented Nov 2, 2021

Feels sad we don't get those changes in 5.2.0. 😢

@ebonow
Copy link
Collaborator

ebonow commented Nov 2, 2021

Feels sad we don't get those changes in 5.2.0. 😢

@Akridian
Sorry 5.2 was based on features/fixes completed several weeks ago but was held up by authentication issues in the release pipeline. We just got those issues resolved over the weekend.

We'll likely discuss your PR this week and hope to get a new release together soon.

@Akridian
Copy link
Contributor

Akridian commented Nov 2, 2021

I appreciate your attention.

@ebonow ebonow modified the milestone: 5.3 Nov 2, 2021
@ebonow ebonow linked a pull request Nov 5, 2021 that will close this issue
@ebonow
Copy link
Collaborator

ebonow commented Nov 5, 2021

@Akridian I'm happy to report that the PR for this was approved and has been merged and released as a part of v5.2.1

@ebonow ebonow closed this as completed Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants