directamente el updatestate en los parentesis?
import React from "react"; import { TextField, Button, Box } from "@mui/material";
const DatosEntrega = ({updateStep} ) => { return ( <Box component="form" autocomplete="off" sx={{ display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", }} onSubmit= {(e) => { e.preventDefault(); updateStep(3); }} > ); };
export default DatosEntrega;
así es como lo puso el profe:
import React from "react"; import { TextField, Button, Box } from "@mui/material";
const DatosEntrega = (props) => { const updateStep = props.updateStep return ( <Box component="form" autocomplete="off" sx={{ display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", }} onSubmit= {(e) => { e.preventDefault(); updateStep(3); }} > ); };
export default DatosEntrega;