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}>
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.