You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/shared/components/FastForm/context.tsx

14 lines
390 B
TypeScript

import React, { useContext } from 'react';
import type { useFormik } from 'formik';
type FastFormContextType = ReturnType<typeof useFormik>;
export const FastFormContext = React.createContext<FastFormContextType | null>(
null
);
FastFormContext.displayName = 'FastFormContext';
export function useFastFormContext(): FastFormContextType | null {
return useContext(FastFormContext);
}