()
| 115 | }; |
| 116 | } |
| 117 | function useAppStore(): AppStateStore { |
| 118 | // eslint-disable-next-line react-hooks/rules-of-hooks |
| 119 | const store = useContext(AppStoreContext); |
| 120 | if (!store) { |
| 121 | throw new ReferenceError('useAppState/useSetAppState cannot be called outside of an <AppStateProvider />'); |
| 122 | } |
| 123 | return store; |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * Subscribe to a slice of AppState. Only re-renders when the selected value |
no outgoing calls
no test coverage detected