
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-sensible
Advanced tools
A collection of sensible, reuseable hooks that cover a vareity of use-cases.
yarn add react-sensible framer-motion
For components you will also need to import CSS
import 'react-sensible/style.css';
TODO
TODO
Use cases: Pagination/Infinite scrolling, Virtualization
Usage:
import { useIntersectionObserver } from 'react-sensible';
export default function Component() {
const ref = React.useRef<HTMLDivElement>(null);
const [data, setData] = React.useState([]);
React.useEffect(() => {
fetchData();
}, []);
const fetchData = async () => {
const data = await fetch(/** Fetch data */).then(res => res.json);
setData(data);
};
useIntersectionObserver({
root: null,
target: ref.current,
onIntersect() {
fetchData();
},
});
return (
<div>
{data.map(item => {
return <div>{item}</div>;
})}
<div ref={ref}>Loading more</div>
</div>
);
}
import { useMediaQuery } from 'react-sensible';
const Component = () => {
const isLarge = useMediaQuery('(min-width: 1024px)');
return isLarge ? (
/** Laptop UI */
<div></div>
) : (
/** Mobile UI */
<div></div>
);
};
import * as React from 'react';
import { useDebounce } from 'react-sensible';
export default function Component() {
const [value, setValue] = React.useState<string>('');
const debouncedValue = useDebounce(value);
React.useEffect(() => {
// Run side-effect on debounced value (like an api call)
}, [debouncedValue]);
return <input value={value} onChange={e => setValue(e.target.value)} />;
}
Credits: Chakra UI
Use cases: Accordion, Modal, Dropdown Menu
Usage:
import useDisclosure from '~/hooks/use-disclosure';
const Component = () => {
const { isOpen, onOpen, onClose } = useDisclosure();
return (
<div>
<button onClick={onOpen}>Open menu</button>
<button onClick={onClose}>Close menu</button>
{isOpen ? <div className="menu"></div> : null}
</div>
);
};
FAQs
A collection of sensible, reuseable hooks that cover a vareity of use-cases.
We found that react-sensible 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.