UNPKG

react-native-filament

Version:

A real-time physically based 3D rendering engine for React Native

10 lines 440 B
import React from 'react'; export const Context = /*#__PURE__*/React.createContext(undefined); export function useFilamentContext() { const context = React.useContext(Context); if (context === undefined) { throw new Error('useFilamentContext (and its hooks such as `useScene()`, components like `<Filament />` etc.) must be used within a `<FilamentProvider>` component!'); } return context; } //# sourceMappingURL=Context.js.map