diff --git a/package.json b/package.json index be71fab..112e563 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-recoil-form", - "version": "0.7.1", + "version": "0.7.2", "license": "MIT", "author": "Wit By Bit", "main": "dist/index.js", diff --git a/src/FormProvider.tsx b/src/FormProvider.tsx index b889b6b..43816e1 100644 --- a/src/FormProvider.tsx +++ b/src/FormProvider.tsx @@ -300,6 +300,12 @@ export function useFormValues() { return formValues; } +export function useFormValuesAndExtraInfos() { + const formId = useContext(FormIdContext); + const { values, extraInfos } = useRecoilValue(formValuesAtom(formId)); + return {values, extraInfos}; +} + export function useInitialValues() { const formId = useContext(FormIdContext); const { values } = useRecoilValue(formInitialValuesAtom(formId));