(a?: readonly any[], b?: readonly any[])
| 12 | scope ? scope.getState(store) : store.getState() |
| 13 | const basicUpdateFilter = <T>(upd: T, oldValue: T) => upd !== oldValue |
| 14 | const keysEqual = (a?: readonly any[], b?: readonly any[]) => { |
| 15 | if (!a || !b || a.length !== b.length) return false |
| 16 | |
| 17 | let isEqual = true |
| 18 | |
| 19 | for (let i = 0; i < a.length; i++) { |
| 20 | if (a[i] !== b[i]) { |
| 21 | isEqual = false |
| 22 | break |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | return isEqual |
| 27 | } |
| 28 | |
| 29 | export function useStoreBase<State>(store: Store<State>, scope?: Scope) { |
| 30 | useDeprecate(true, 'useStore', 'useUnit') |
no outgoing calls
no test coverage detected
searching dependent graphs…