переписал ответ
вот
докаHelloContextconst Hello = createContext<string>('Hello');
export default Hello;
App.tsx import Hello from 'HelloContext';
import MyComponent from 'MyComponent';
function App() {
return (
<Hello.Provider value='Hi'>
<MyComponent />
</Hello.Provider>
);
}
export default App;
MyComponent.tsx import HelloContext from 'HelloContext';
const MyComponent: React.FC<> = () => {
const msg = useContext(HelloContext );
return (
<span>{msg}</span>
)
}
export default MyComponent;
P.S.
</Theme.Provider> <-- откуда Theme?