
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-use-what-input
Advanced tools
useWhatInputThis wraps the What Input library to make it easier to integrate directly into React apps, allowing you to tailor the behavior of your components to the input method that your visitors are currently using.
yarn:
npm install react-use-what-input
npm:
yarn add react-use-what-input
By default, the hook will listen for changes in input and intent so that your components can display or behave differently.
import useWhatInput from 'react-use-what-input';
const YourComponent = () => {
const [currentInput, currentIntent] = useWhatInput();
return (
<dl>
<dt>Input:</dt><dd>{currentInput}</dd>
<dt>Intent:</dt><dd>{currentIntent}</dd>
</dl>
)
};
If you only need either input or intent, you can pass an argument. This is available to help avoid unnecessary re-renders, but in practice it's probably not that big of an optimization.
import useWhatInput from 'react-use-what-input';
const YourInputAwareComponent = () => {
const currentInput = useWhatInput('input');
return (
<dl>
<dt>Input:</dt><dd>{currentInput}</dd>
</dl>
)
};
const YourIntentAwareComponent = () => {
const currentIntent = useWhatInput('intent');
return (
<dl>
<dt>Intent:</dt><dd>{currentIntent}</dd>
</dl>
)
};
What Input adds data- attributes to the document element. This library does
not do anything to avoid the behavior. This isn't a good or band thing, just
something to know!
ISC © Keith McKnight
FAQs
React hook for what-input integration
We found that react-use-what-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.