mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
build(store): build26 from 45504a2b
This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
import { useSelector } from "./use-selector.js";
|
||||
import { identity, noop } from "@videojs/utils/function";
|
||||
//#region src/react/hooks/use-store.ts
|
||||
const noopSubscribe = () => noop;
|
||||
function useStore(store, selector, isEqual) {
|
||||
return useSelector(selector ? (cb) => store.subscribe(cb) : noopSubscribe, selector ? () => store.state : () => store, selector ?? identity, isEqual);
|
||||
}
|
||||
//#endregion
|
||||
export { useStore };
|
||||
|
||||
//# sourceMappingURL=use-store.js.map
|
||||
Reference in New Issue
Block a user