-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat(FEC-10076): add support for dynamic injection #538
Conversation
* @returns {Function} - Removal function | ||
* @memberof UIManager | ||
*/ | ||
addComponent: (component: KPUIComponent) => Function; |
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.
I would consider two things - not related to each other
- provide a noop method as a fallback
() => { return () => {} }
. relevant also for line 181 - expose a public method for the PlayerAreaProvider instead of passing the method to the upper component and use ref to invoke that method
both not mandatory but might be more solid
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.
- done
- I tried this option. it's doesn't work since the ref points the
withLogger
wrapper
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.
approving as your code seems fine. just check my comment above for possible improvements
Expose the new [`UIManager.addComponent`](kaltura/playkit-js-ui#538) api
Description of the Changes
UIManager
ExposesaddComponent
api which actually deligates toPlayerAreaProvider._addNewComponentAndUpdateListeners
method (using Render-Props technique)Fragment
children since add and remove the component behaves worried when children wrapped by aFragment
CheckLists