src/components/registration/Registration.js
/**
 * Classes in React allow you to have an internal state within the class and to have the React life-cycle for your component.
 * You should have a class (instead of a functional component) when:
 * - You need an internal state that cannot be achieved via props from other parent components
 * - You fetch data from the server (e.g., in componentDidMount())
 * - You want to access the DOM via Refs
 * https://reactjs.org/docs/react-component.html
 * @Class
 */
Classes in React allow you to have an internal state within the class and to have the React life-cycle for your component.
Classes in React allow you to have an internal state within the class and to have the React life - cycle for your component .
function ValidationMessage(props) {
    if (!props.valid) {
        return (
            <ErrorMessage className='error-msg'>{props.message}</ErrorMessage>
        )
    }
    return null;
}
function ValidationMessage ( props ) { if ( ! props . valid ) { return ( < ErrorMessage className = 'error-msg' > { props . message } < / ErrorMessage > ) } return null ; }
Classes in React allow you to have an internal state within the class and to have the React life-cycle for your component.
Classes in React allow you to have an internal state within the class and to have the React life - cycle for your component .