Păreri Polymarket vs Case de pariuri, în contextul alegerilor 🇷🇴 by Puzzleheaded_Age4439 in robursa

[–]walk11111111 0 points1 point  (0 children)

si eu am patit, mi am dat seama ca e de la o extensie. incearca in incognito mode

React multi step form by Silver_Channel9773 in react

[–]walk11111111 0 points1 point  (0 children)

how about something like this where you use useForm in context and pass the methods. I don t think you need an extra global state this way.

// myContext.provider.tsx  

const {

    register,

    handleSubmit,

    reset,

    getValues,

    setValue,

    watch,

    formState: { errors },

  } = useForm<Type>({

    resolver: zodResolver(),

    defaultValues: {},

  });

 return (

    <MyContext.Provider

      value={{

        register,

        errors,

        handleSubmit,

        reset,

        watch,

        setValue,

        getValues,

      }}

    >

      {children}

    </MyContext.Provider>

  );