(api, selector)
| 40 | } |
| 41 | |
| 42 | function useStore(api, selector) { |
| 43 | function getState() { |
| 44 | return selector(api.getState()); |
| 45 | } |
| 46 | |
| 47 | return useSyncExternalStore(api.subscribe, getState) |
| 48 | } |
| 49 | |
| 50 | export const create = (createState) => { |
| 51 | const api = createStore(createState) |
no outgoing calls
no test coverage detected