The components inserted here "UserBasicData" and "UserSendData" have "Field" input fields in it. After inserting the compoenets,this complete component is exported as redux form. Now I want to check if this form isDirty(if any changes have happened to the user fields?). I am not able to implement isDirty in this scenario. I tried to do var dirty = isDirty(UserProcess)(useSelector(state => (state as any).form)); but it is showing error and I did not get var dirty as true or false. How should I implement isDirty() in this context?
const UserProcessForm:React.FC<Props & InjectedFormProps<Userdata, Props>> = (uuid:string)=>{
const navigate = useNavigate();
const toSend = () => navigate(`/send/${uuid}`);
const toData = () => navigate(`/title/${uuid}`);
return (
<SummaryStyled onClick={toData}>
<UserBasicData/>
<SummaryStyled/>
<SummaryAreaStyled onClick={toSend}>
<UserSendData/>
<SummaryAreaStyled/>
)
};
export const UserProcess = reduxForm<Userdata, Props>({
form: 'UserProcess',
})(UserProcessForm);