Skip to content

Commit

Permalink
Merge pull request #4886 from Akridian/export-hooks
Browse files Browse the repository at this point in the history
Export hooks
  • Loading branch information
JedWatson committed Nov 5, 2021
2 parents 4563298 + 21fbc87 commit b2bfd22
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-colts-explain.md
@@ -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
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
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
@@ -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

0 comments on commit b2bfd22

Please sign in to comment.