score:0

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>

score:0

<ValidateRegister error={error} setError={setError} />

// and take it as props in ValidateRegister component like

const ValidateRegister = ({error, setError}) => {
 //your code
 }

Related Query

More Query from same tag