
Company News
Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development
Socket is scaling to defend open source against supply chain attacks as AI accelerates software development.
@jutech-devs/react-hooks
Advanced tools
A comprehensive collection of 30+ modern, production-ready React hooks for enhanced development experience
The ultimate collection of 42 production-ready React hooks for modern web development. From basic utilities to advanced AI capabilities.
npm install @jutech-devs/hooks
# or
yarn add @jutech-devs/hooks
import { useToggle, useFetch, useDarkMode } from '@jutech-devs/hooks';
function App() {
const [isOpen, { toggle }] = useToggle();
const { data, loading } = useFetch('/api/users');
const { isDark, toggleTheme } = useDarkMode();
return (
<div className={isDark ? 'dark' : 'light'}>
<button onClick={toggle}>
{isOpen ? 'Close' : 'Open'} Modal
</button>
<button onClick={toggleTheme}>Toggle Theme</button>
{loading ? 'Loading...' : data?.length} users
</div>
);
}
useToggle - Boolean state managementuseDebounce - Value debouncingusePrevious - Track previous valuesuseCountdown - Timer functionalityuseHover - Mouse hover detectionuseLocalStorage - localStorage with React syncuseSessionStorage - sessionStorage with React syncuseDarkMode - Complete theme systemuseFetch - Smart HTTP requests with cachinguseAsync - Async operation managementuseWebSocket - Real-time WebSocket connectionsuseWebRTC - Video/audio communicationuseClickOutside - Outside click detectionuseWindowSize - Responsive window dimensionsuseIntersectionObserver - Element visibilityuseDrag - Drag & drop functionalityuseGesture - Advanced touch gesturesuseSpring - Physics-based animationsuseIsMobile - Mobile device detectionuseGeolocation - GPS location trackinguseBattery - Battery status monitoringuseNetworkState - Network connection infouseCamera - Camera access & captureusePermission - Browser permission managementuseKeyboardShortcut - Hotkey combinationsuseCopyToClipboard - Clipboard operationsuseSpeechRecognition - Voice inputuseIdle - User activity detectionuseScrollPosition - Scroll trackinguseFormValidation - Real-time form validationuseFileUpload - File upload with progressuseVirtualList - Handle large datasetsuseWorker - Web Workers for background tasksuseMediaQuery - Custom media queriesuseIsSmall - Small screen detectionuseIsTablet - Tablet detectionuseIsDesktop - Desktop detectionusePrefersDarkMode - System theme preferenceusePrefersReducedMotion - Accessibility preferenceuseNotification - Browser notificationsuseStateMachine - State machine implementationuseUndoRedo - Undo/redo functionalityuseObservable - Reactive programminguseP2P - Peer-to-peer networkinguseML - Neural networks in the browseruseComputerVision - Image analysis & object detectionuseNLP - Natural language processinguseRecommendationEngine - Personalization algorithms// Toggle state
const [isVisible, { toggle, setTrue, setFalse }] = useToggle(false);
// Debounced search
const [search, setSearch] = useState('');
const debouncedSearch = useDebounce(search, 300);
// Local storage
const [user, setUser] = useLocalStorage('user', null);
// Fetch with caching
const { data, loading, error, refetch } = useFetch('/api/posts', {
cache: true,
immediate: true
});
// WebSocket connection
const { sendMessage, lastMessage, isConnected } = useWebSocket('ws://localhost:8080');
// Async operations
const { execute, loading, data, error } = useAsync(async (id) => {
return await api.getUser(id);
});
// Click outside detection
const ref = useClickOutside(() => setIsOpen(false));
// Drag and drop
const { isDragging, position, dragRef } = useDrag();
// Intersection observer
const [setNode, entry] = useIntersectionObserver({
threshold: 0.5,
freezeOnceVisible: true
});
// Geolocation
const { latitude, longitude, error } = useGeolocation({
enableHighAccuracy: true,
watch: true
});
// Camera access
const { stream, startCamera, takePhoto, isStreaming } = useCamera();
// Battery status
const { level, charging, supported } = useBattery();
// Form validation
const { values, errors, setValue, isValid } = useFormValidation(
{ email: '', password: '' },
{
email: [(v) => v.includes('@') ? null : 'Invalid email'],
password: [(v) => v.length >= 8 ? null : 'Too short']
}
);
// State machine
const { state, send, can } = useStateMachine({
id: 'toggle',
initial: 'inactive',
states: {
inactive: { on: { TOGGLE: 'active' } },
active: { on: { TOGGLE: 'inactive' } }
}
});
// Computer vision
const { detectObjects, detectFaces, analyzeScene } = useComputerVision();
const objects = await detectObjects(imageElement);
✅ TypeScript First - Full type safety and IntelliSense
✅ Zero Dependencies - Lightweight and fast
✅ SSR Compatible - Works with Next.js, Remix, etc.
✅ Tree Shakeable - Import only what you need
✅ Production Ready - Battle-tested in real applications
✅ Comprehensive - 42 hooks covering every use case
✅ Modern APIs - WebRTC, WebWorkers, AI, and more
✅ Performance Optimized - Minimal re-renders
MIT © JuTech Devs
Contributions are welcome! Please read our contributing guidelines.
For support, please open an issue on GitHub or contact us at support@jutech-devs.com
FAQs
A comprehensive collection of 30+ modern, production-ready React hooks for enhanced development experience
The npm package @jutech-devs/react-hooks receives a total of 4 weekly downloads. As such, @jutech-devs/react-hooks popularity was classified as not popular.
We found that @jutech-devs/react-hooks demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Company News
Socket is scaling to defend open source against supply chain attacks as AI accelerates software development.

Research
/Security News
A long-running Go typosquat impersonated the popular shopspring/decimal library and used DNS TXT records to execute commands.

Research
Active npm supply chain attack compromises @antv packages in a fast-moving malicious publish wave tied to Mini Shai-Hulud.