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
I'm trying to make a theme provider with export through react context. Problem is that the goober is using a default value in the context, so I can't update the context value after the new theme comes in. Is there any way to do that? Or am I missing something.
export const ThemeContext = createContext<ThemeType | undefined>(undefined);
export const useTheme = () => useContext(ThemeContext);
setup(React.createElement, undefined, useTheme, (props) => {
for (const prop in props) {
if (skipArr.includes(prop)) {
delete props[prop];
}
}
});`
export const Theme = ({ children, theme }: Props) => {
// update setup with new theme here
return (
<ThemeContext.Provider value={theme}>
The text was updated successfully, but these errors were encountered:
jjjtoikka
changed the title
Theme component with provider and dynamic value
Theme component with a provider and a dynamic value
Oct 13, 2022
Hello,
and thanks for a great library!
I'm trying to make a theme provider with export through react context. Problem is that the
goober
is using a default value in the context, so I can't update the context value after the new theme comes in. Is there any way to do that? Or am I missing something.The text was updated successfully, but these errors were encountered: