1.0.0 • Published 3 years ago

campsy-device-detection v1.0.0

Weekly downloads
8
License
ISC
Repository
github
Last release
3 years ago

Node Package

This is a simple node package that can be used in any solution by importing and calling the variables.

Installation

    npm install campsy-device-detection

Usage

    // import the class into the component
    import {mobileDevice} from "campsy-device-detection"

    // Render what is returned
    <h1>Value: {JSON.stringify(mobileDevice)}</h1>

    // Use it for conditionally rendering, React Example
    const NewComponent = () => {
        <React.Fragment>
            <h1>The H2 tag below will only render based on the condition!</h1>
            {mobileDevice && <h2>This will render if mobileDevice is true</h2>}
        </React.Fragment>
    }
1.0.0

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago