Iโm Mic, a product engineer with over five years of experience in web development and product design.
I build mission-driven digital products using modern web technologies and have a fondness for UX design.
Contact GitHub support about this userโs behavior. Learn more about reporting abuse.
Report abuseIโm Mic, a product engineer with over five years of experience in web development and product design.
I build mission-driven digital products using modern web technologies and have a fondness for UX design.
import { useEffect, useRef } from 'react'
export function usePrevious<T>(value: T) {
const ref = useRef<T>()
import { useRef, useEffect } from 'react'
export const useIsMounted = () => {
const isMounted = useRef(false)
export const asyncWrap = (promise: Promise<any>) =>
promise
.then(result => [false, null, result])
.catch(err => [false, err, null])