Socket
Socket
Sign inDemoInstall

@nuskin/mobile-hooks

Package Overview
Dependencies
1
Maintainers
5
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuskin/mobile-hooks


Version published
Maintainers
5
Weekly downloads
512
increased by6.67%

Weekly downloads

Readme

Source

Hooks

Collection of useful hooks including:

  • useColorScheme
  • useClipboard

Installation

yarn add @nuskin/hooks

Usage - useColorScheme

import { useColorScheme } from '@nuskin/hooks'

// ...

const colorScheme = useColorScheme()

const theme = React.useMemo(() => {
  return colorScheme === 'dark' ? MavelyDarkTheme : MavelyDefaultTheme
}, [colorScheme])

// ...

return (
  <NavigationContainer theme={theme}>
    <Navigation />
  </NavigationContainer>
)

Usage - useClipboard

import { useClipboard } from '@nuskin/hooks'
import { Button } from '@nuskin/ui'

// ...

const [, updateContent] = useClipboard()

// ...

return (
  <Button title="Copy link to clipboard" onPress={() => updateContent(link)} />
)

FAQs

Last updated on 08 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc