React Form reload page after adding Style
It's not about styling, but about your generated HTML structure.
FormContainerPart
is a form
so when you're submitting your form (by clicking the button) you're submitting your Form
from react-final-form
AND your form
from FormContainerPart
.
And as you're not catching the onSubmit
handler on your form
by FormContainerPart
, well it goes to default navigator behavior, which is: reload the page
So, as there is no need for FormContainerPart
to be a form
just change your styled
to
export const FormContainerPart = styled.div`
...
`