Skip to content
View mic-css's full-sized avatar
Block or Report

Block or report mic-css

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this userโ€™s behavior. Learn more about reporting abuse.

Report abuse
mic-css/README.md

Hi there ๐Ÿ‘‹

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.

  • ๐Ÿ”ญ I work at Shopify as a senior frontend developer
  • ๐Ÿ’ฌ Ask me about working in early-stage start-ups, React and React Native, TDD...
  • ๐Ÿ“ซ How to reach me: send me a message on LinkedIn
  • ๐Ÿ˜„ Pronouns: he/him
  • โšก Fun fact: I used to have a talking parrot called Romeo

Pinned Loading

  1. Custom hook that keeps track of the ... Custom hook that keeps track of the previous value of an object or primitive, useful for comparing props between renders
    1
    import { useEffect, useRef } from 'react'
    2
    
                  
    3
    export function usePrevious<T>(value: T) {
    4
      const ref = useRef<T>()
    5
    
                  
  2. Custom hook that keeps track of whet... Custom hook that keeps track of whether a component is mounted, useful for canceling asynchronous setStates
    1
    import { useRef, useEffect } from 'react'
    2
    
                  
    3
    export const useIsMounted = () => {
    4
      const isMounted = useRef(false)
    5
    
                  
  3. Custom wrapper function for destruct... Custom wrapper function for destructuring asynchronous requests into loading, error and result states
    1
    export const asyncWrap = (promise: Promise<any>) =>
    2
      promise
    3
        .then(result => [false, null, result])
    4
        .catch(err => [false, err, null])
    5