skip to Main Content

Reactjs – why i'm not receiving values in server?

const SignUpForm = () => { const {values ,errors , handleChange , handleSubmit} = useFormik({ initialValues , validationSchema: SignupSchema, onSubmit : async ()=>{ const user = await fetch('http://localhost:8080/user/register' ,{ method : "POST" , body : JSON.stringify(values) }) console.log(user ,values); }…

VIEW QUESTION

Html – How to prevent click propagation when we have a parent anchor limk which has a button as one of children

When I click on the Link parent it fires the click on the button as well, I want both events to be separated. <Link className="product-item__link" to={`/products/${product.category}/${product.id}`} > <div className='product-item'> {/*I have here other elements*/} <button className="product-item__btn" onClick={() => addToCart(product)}>Add to…

VIEW QUESTION
Back To Top
Search