1234567891011121314151617 |
- import React from "react";
-
- export default () => {
- const pageCtxRef = React.useRef();
-
- const setPageCtx = (ctx) => {
- pageCtxRef.current = ctx;
- }
- const getPageCtx = () => {
- return pageCtxRef.current;
- }
-
- return {
- setPageCtx,
- getPageCtx,
- }
- }
|