-
Notifications
You must be signed in to change notification settings - Fork 73
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
draft of modality specific usePropsFor functions #5684
base: main
Are you sure you want to change the base?
Conversation
Storybook 8 URL https://60c7ae6891f0e90039d7cd54-hkqerigezz.chromatic.com/ |
} | ||
}; | ||
|
||
export const useCallingPropsFor = <Component extends (props: any) => JSX.Element>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of recreating these in the mergedHooks, reexport them in the index.ts directly from the packlets
export { usePropsFor as useCallingPropsFor, getSelector as getCallingSelector } from './hooks/usePropsFor'; |
} | ||
|
||
if (!chatSelector) { | ||
throw "Can't find corresponding selector for this component. Please check the supported components from Azure Communication UI Feature Component List."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For an error like this is there a link we can provide to storybook?
What
We want to make separate exposed usePropsFor functions for Chat and Calling individually. This is because if you use the top-level usePropsFor function you will pull in all of the code and negate any opportunity for tree shaking. This is more of a problem when utilizing the Chat UI code and unfortunately pulling in all of the Calling code as well when using this function.
Is this a breaking change?
No, its an additive change.