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

Export hooks #4886

Merged
merged 4 commits into from
Nov 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/metal-colts-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-select': patch
---

Hooks for creation of custom Selects are now exported from main entry
1 change: 1 addition & 0 deletions packages/react-select/src/Async.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ const AsyncSelect = React.forwardRef(
}
) as AsyncSelect;

export { useAsync };
export default AsyncSelect;
1 change: 1 addition & 0 deletions packages/react-select/src/Creatable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ const CreatableSelect = React.forwardRef(
}
) as CreatableSelect;

export { useCreatable };
export default CreatableSelect;
2 changes: 2 additions & 0 deletions packages/react-select/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Select from './Select';
import { GroupBase } from './types';
import useStateManager from './useStateManager';

export { default } from './stateManager';
export { default as NonceProvider } from './NonceProvider';
Expand All @@ -13,6 +14,7 @@ export type SelectInstance<
Group extends GroupBase<Option> = GroupBase<Option>
> = Select<Option, IsMulti, Group>;
export type { StateManagerProps as Props } from './useStateManager';
export { useStateManager };

export type { SelectComponentsConfig } from './components';
export type {
Expand Down