A simple React hook that provides a boolean for the screen is mobile or not.
View Demo
·
Report Bug
·
Request Feature
Table of Contents
useIsMobile is a custom hook for React. It gives you a boolean for the screen is mobile or not.
React and ReactDOM must be installed in your project.
- npm
npm install react react-dom
- Install via npm
npm install useismobile
- Install via yarn
yarn add useismobile
You can see a basic usage example at codespace demo
Any contribution is welcome.
Commitizen standardizes to commit messages, just don't forget to use npm commit command.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Make your changes.
- Commit your Changes with npm (
npm run commit
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Tufantunc - @tufant
Project Link: https://github.com/tufantunc/useismobile