As drew-reese suggested, the button was actually triggering the method nextStep and also submitting the form, since the button didn't have a type="button" property.
It is inside a form, so it's treated like a submit button. Adding type="button" to the DefaultButton component solved the problem.