ra-core
Version:
Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React
11 lines (9 loc) • 341 B
text/typescript
import { useContext } from 'react';
import { FormGroupContext } from './FormGroupContext';
/**
* Retrieve the name of the form group the consumer belongs to. May be undefined if the consumer is not inside a form group.
*/
export const useFormGroupContext = () => {
const context = useContext(FormGroupContext);
return context;
};