Skip to content

this hook useful when component needed to render by changing the screen breakpoints

Notifications You must be signed in to change notification settings

sorantaha/React-useScreenSize-Hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

React-useScreenSize-Hook

This hook is useful when a component needs to render based on screen breakpoints. It contains two states (breakpoint, screen) and two helper functions (getScreen, getBreakpoint).

import useScreenSize from './use_screen_size.js';
const [breakpoint, screen, getScreen, getBreakpoint] = useScreenSize();
console.log(breakpoint, screen, getScreen(1280), getBreakpoint("lg"));

About

this hook useful when component needed to render by changing the screen breakpoints

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published