UNPKG

@fakel/rest-admin

Version:

An application that makes it easier to work with your API

9 lines (8 loc) 320 B
import { useContext } from 'react'; import { selectStore } from '../selectors/selectorStore'; import { AdminContext } from '../components/StoreProvider'; export var useStore = function (name) { var adminStore = useContext(AdminContext).adminStore; var store = selectStore(adminStore, name); return store; };