Skip to content

Commit

Permalink
Change default export with named export (#917)
Browse files Browse the repository at this point in the history
By exporting each hook in a default object doesn't allow to import them individually as shown down on the sample of how to use them.
  • Loading branch information
call0fcode committed Aug 5, 2024
1 parent f25bf22 commit 8d0e444
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/docs/docs/typescript-api/create-typed-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { StoreModel } from './model';

const { useStoreActions, useStoreState, useStoreDispatch, useStore } = createTypedHooks<StoreModel>();

export default {
export {
useStoreActions,
useStoreState,
useStoreDispatch,
Expand All @@ -30,4 +30,4 @@ export default MyComponent() {
const message = useStoreState(state => state.message);
return <div>{message}</div>;
}
```
```

0 comments on commit 8d0e444

Please sign in to comment.