@react-navigation/core
Version:
Core utilities for building navigators
12 lines (11 loc) • 372 B
JavaScript
import * as React from 'react';
import { ThemeContext } from "./ThemeContext.js";
export function useTheme() {
const theme = React.useContext(ThemeContext);
if (theme == null) {
throw new Error("Couldn't find a theme. Is your component inside NavigationContainer or does it have a theme?");
}
return theme;
}
//# sourceMappingURL=useTheme.js.map
;