You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2024. It is now read-only.
PR #1397 updated the useMultiStyleConfig() documentation to use the new createStylesContext() API rather than the old and deprecated global StylesProvider.
There are two problems with the current state of the documentation:
While <Menu /> is using the new createStylesContext(), <MenuItem /> is still using the global useStyles(). This does not work. (Throws error that child is not in a <StylesProvider />
<Menu /> is calling createStylesContext() from inside the react component. This is causing StylesProvider to be a new element on every render, which will cause children to hard remount (In my case all DOM nodes are being fully removed and re-added each time the parent re-renders.
Documentation should have createStylesContext() moved outside of the parent component, with the child component using the use hook returned by createStylesContext() rather than the global useStyles()
The text was updated successfully, but these errors were encountered:
Hi!
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs within 5 days. Thank you for your contributions.
Subject
createStylesContext
Description
PR #1397 updated the
useMultiStyleConfig()
documentation to use the newcreateStylesContext()
API rather than the old and deprecated globalStylesProvider
.There are two problems with the current state of the documentation:
<Menu />
is using the newcreateStylesContext()
,<MenuItem />
is still using the globaluseStyles()
. This does not work. (Throws error that child is not in a<StylesProvider />
<Menu />
is callingcreateStylesContext()
from inside the react component. This is causingStylesProvider
to be a new element on every render, which will cause children to hard remount (In my case all DOM nodes are being fully removed and re-added each time the parent re-renders.Documentation should have
createStylesContext()
moved outside of the parent component, with the child component using the use hook returned bycreateStylesContext()
rather than the globaluseStyles()
The text was updated successfully, but these errors were encountered: