zaguiini / formik-wizard

A multi-step form component powered by formik and react-albus
MIT License
86 stars 26 forks source link

Cannot submit form when using with React Native #12

Closed micabe closed 4 years ago

micabe commented 4 years ago

see line https://github.com/zaguiini/formik-wizard/blob/master/src/index.tsx#L111

if we remove Form then submit hook will never be called..

micabe commented 4 years ago

no worries, i used it like this

   render={({ children, actionLabel }) => {
      const { errors, submitForm } = useFormikContext()

      return (
        <Background>
          {children}
          <Button onPress={submitForm} title="Submit">
            {actionLabel}
          </Button>
        </Background>
      )
    }}
zaguiini commented 4 years ago

See this for reference: https://github.com/zaguiini/formik-wizard#usage-with-react-native