1.0.2 • Published 6 months ago

ismobile-next-ssr v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

ismobile ssr nextjs

This script will detect the device by comparing patterns from User-Agent string, compatible with server component (SSR) server side rendering for nextjs app.

install

$npm install ismobile-next-ssr --save

usage

```
import isMobile from 'ismobile-next-ssr'
export default function MyApp({ params }) {
    return (
        {isMobile() ? (
            <YourMobileComponent />
        ):(
            <YourDesktopComponent />
        )}
    )
}
```

TODO

  • add triggered component in custome drirecotry for dynamic component.
1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago