mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
14 lines
428 B
JavaScript
14 lines
428 B
JavaScript
import { onI18nRegistryChange } from "@videojs/core/i18n";
|
|
import { useEffect, useReducer } from "react";
|
|
//#region src/i18n/use-registry-epoch.ts
|
|
function useRegistryEpoch() {
|
|
const [epoch, invalidate] = useReducer((value) => value + 1, 0);
|
|
useEffect(() => {
|
|
return onI18nRegistryChange(() => invalidate());
|
|
}, []);
|
|
return epoch;
|
|
}
|
|
//#endregion
|
|
export { useRegistryEpoch };
|
|
|
|
//# sourceMappingURL=use-registry-epoch.js.map
|