UNPKG

@refinedev/core

Version:

Refine is a React meta-framework for building enterprise-level, data-intensive applications rapidly with support for modern UI libraries and headless integrations.

21 lines (16 loc) 719 B
import { useContext } from "react"; import { RefineContext } from "@contexts/refine"; import type { IRefineContextOptions } from "../../contexts/refine/types"; type UseSyncWithLocationType = () => { syncWithLocation: IRefineContextOptions["syncWithLocation"]; }; /** * List query parameter values can be edited manually by typing directly in the URL. * To activate this feature `syncWithLocation` needs to be set to `true`. * * @see {@link https://refine.dev/docs/api-reference/core/components/refine-config/#syncwithlocation} for more details. */ export const useSyncWithLocation: UseSyncWithLocationType = () => { const { syncWithLocation } = useContext(RefineContext); return { syncWithLocation }; };