Skip to content

Instantly share code, notes, and snippets.

View WebDeg-Brian's full-sized avatar
🎬
Watching Anime

[Account Depreciated] WebDeg-Brian

🎬
Watching Anime
  • Northampton, UK
View GitHub Profile
@WebDeg-Brian
WebDeg-Brian / LoginBox.js
Last active November 12, 2019 13:36
React validation hook for reusablitily's sake
import React, { useCallback, useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { TextField, Button, Link as MuiLink } from '@material-ui/core';
import { withRouter, Link } from 'react-router-dom';
import { isEmpty, isEmail } from 'validator';
import { connect } from 'react-redux';
import { useFormField } from 'app-hooks';
import firebase from 'app-firebase';
import { FormBox, ButtonWrapper } from '../shared';