Skip to content

VasilKostadinov0104/useful-Nextjs-Functions-And-Hooks

Repository files navigation

useful-Nextjs-Functions-And-Hooks

Here you can find many hooks and util functions, that i've used and created to make my life easy.

update 23.11.21 Intital upload

  • useSessionStorage
  • capitalize
    • capitalizes first letter of string
  • ClientOnlyWrapper
    • renderes only on client
  • DesktopOnlyWrapper
    • renders components only when you are on desktop
  • MobileOnyWrapper
    • renders components only when you are on mobile
  • formatDate
    • formats the date (you can customize the language features, currently it is in bulgarian)
  • parseMarkdown
    • basic function to parse markdown. may be updated
  • Tooltip
    • adds tooltip to your mouse on hover of a component
  • useScroll
    • blocks and allows scrolling
  • useSwipeClose
    • mobile swiping in a direction fires a function
  • useWindowSize
    • gets the window width and height without ssr error
  • timeSince
    • gives you the time between timestamps in days

About

Here you can find many hooks and util functions, that i've used and created to make my life easy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published