nvm use # sets node and npm version
yarn install # installs required packages
yarn dev # starts local dev environment
yarn dev # build and watch file changes for development
yarn build # build for production
yarn start # run the application
yarn lint # lint scss and js files with stylelint
yarn format # format scss and js files with prettier
Hook name | Description | Usage |
---|---|---|
useAccordion | opens and close accordion item | JS const { clickAction, openedFlag } = useAccordion({ expandableWrapper, expandableInnerContent }); |
useCreatePortalInBody | creates portal | JS const children = useCreatePortalInBody( name, element ); |
useCurrentRefs | returns object with array of passed refs | JS const refs = useCurrentRefs( items[] ); |
useInterval | creates react compliant setInterval() |
JS const interval = useInterval( callback(), delay, deps ); |
useIsMobile | returns a boolean if the resolution is smaller/larger than the passed breakpoint | JS const isMobile = useIsMobile( breakpoint ); |
useIsTouchDevice | checks the device has touch and returns a boolean | JS const isTouchDevice = useIsTouchDevice(); |
useMouse | returns mouse event props | JS const mouseMoveDate = useMouse(); |
useOutsideClick | tracks click event outside the element | JS const clickOutside = useOutsideClick( ref, handler(), options{} ); |
usePreviousDifferent | checks if previous value is different then current | JS const isPreviousValueDifferent = usePreviousDifferent( currentValue ); |
useTriggerWindowResize | window custom resize event | JS const customWindowResize = useTriggerWindowResize(); |
useWindowResize | window resize event | JS const windowResize = useWindowResize( callback() ); |
useWindowScrollPosition | returns window scroll position | JS const scrollPosition = useWindowScrollPosition(); // { scrollX, scrollY } |
useWindowSize | returns window scroll position | JS const windowSize = useWindowSize(); // { width, height } |
https://realfavicongenerator.net/
MIT © BORNFIGHT STUDIO®