Security News
npm Updates Search Experience with New Objective Sorting Options
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
@volvo-cars/react-utils
Advanced tools
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
)
💡 This package includes Typescript definitions
Returns the previous value of a passed prop or state.
Name | Description | Type | Default Value |
---|---|---|---|
value | The property you wish to know the previous state of post re-render | unknown | undefined |
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!')
Name | Description | Type | Default Value |
---|---|---|---|
keysToListenTo | Comma or space delimited list of keys to listen to | string | undefined |
callback | Function to be invoked on keypress | func | undefined |
FAQs
Common and general React hooks
We found that @volvo-cars/react-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
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.
Security News
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.