Closed brechtarnou closed 4 years ago
Hi,
Is it possible to give state from my MultiForm to Formwrapper?
`function MultiForm(props) { console.log(props) const handleSubmit = React.useCallback(values => { console.log("full values:", values)
return { message: "Thanks for submitting!", }
}, [])
return (
) }
export default MultiForm`
As you can see this is the MultiForm component, and I want to pass some state to my FormWrapper to render the correct button.
`function FormWrapper({ children, isLastStep, status, goToPreviousStep, canGoBack, actionLabel, type, }) { console.log(type) return (
) } ` But the type prop I want to pass through is undefined in my FormWrapper.
Thanks in advance.
For those type of questions, StackOverflow is better suited. Please create a topic there describing your problem. Thanks!
Hi,
Is it possible to give state from my MultiForm to Formwrapper?
`function MultiForm(props) { console.log(props) const handleSubmit = React.useCallback(values => { console.log("full values:", values)
}, [])
return (
) }
export default MultiForm`
As you can see this is the MultiForm component, and I want to pass some state to my FormWrapper to render the correct button.
`function FormWrapper({ children, isLastStep, status, goToPreviousStep, canGoBack, actionLabel, type, }) { console.log(type) return (
) } ` But the type prop I want to pass through is undefined in my FormWrapper.
Thanks in advance.