Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@volvo-cars/react-utils

Package Overview
Dependencies
Maintainers
8
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volvo-cars/react-utils

Common and general React hooks

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8K
decreased by-9.93%
Maintainers
8
Weekly downloads
 
Created
Source

React Utils

Questions? Ask in Slack #vcc-ui

@volvo-cars/react-utils

This package exposes useful generic hooks that don't belong to a hook collection (like react-layout-utils)

Installation

💡 This package includes Typescript definitions


usePrevious

Returns the previous value of a passed prop or state.

NameDescriptionTypeDefault Value
valueThe property you wish to know the previous state of post re-renderunknownundefined

useKeyPress

Adds an event listener on component mount that invokes the provided callback function on matching key(s)press.

useKeyPress('Escape', () => console.log('Escape key pressed!')
NameDescriptionTypeDefault Value
keysToListenToComma or space delimited list of keys to listen tostringundefined
callbackFunction to be invoked on keypressfuncundefined

FAQs

Package last updated on 10 May 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc