Skip to content

Instantly share code, notes, and snippets.

@Anmo
Anmo / App.js
Created July 22, 2020 08:58
Creating one event handler for all input types in React by Akash Thakur
import React, { useState, useCallback } from 'react';
import useForm from './use-form';
import './styles.css';
export default function App() {
const [state, handleChange] = useForm({
userName: '',
age: '',
status: 'beginner',