Created
September 11, 2021 01:47
-
-
Save MeetMartin/28036d6835028e88a1f57efa9a7453ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import useDeviceType from '../hooks/useDeviceType'; | |
const DeviceComponent = () => { | |
const isMobile = useDeviceType(); | |
return ( | |
<p> | |
You are using a {isMobile ? 'mobile device' : 'computer'}. | |
</p> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment