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

@react-hookz/web

Package Overview
Dependencies
Maintainers
2
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-hookz/web - npm Package Compare versions

Comparing version 21.0.0 to 22.0.0

cjs/index.d.ts

32

package.json
{
"name": "@react-hookz/web",
"version": "21.0.0",
"version": "22.0.0",
"description": "React hooks done right, for browser and SSR.",

@@ -24,11 +24,8 @@ "keywords": [

"files": [
"dist"
"cjs",
"esm"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"module": "dist/index.js",
"esnext": {
"browser": "dist/index.js",
"module": "dist/index.js"
},
"main": "./cjs/index.js",
"types": "./cjs/index.d.ts",
"module": "./esm/index.js",
"sideEffects": false,

@@ -38,5 +35,6 @@ "scripts": {

"commit": "git-cz",
"build": "yarn build:cleanup && yarn build:dist",
"build": "yarn build:cleanup && concurrently yarn:build:cjs yarn:build:esm",
"build:cleanup": "rimraf ./dist",
"build:dist": "ttsc -p ./tsconfig.build.json",
"build:cjs": "ttsc -p ./tsconfig.build.json --module CommonJS --outDir ./cjs",
"build:esm": "ttsc -p ./tsconfig.build.json --module ESNext --outDir ./esm",
"new-hook": "node ./utility/add-new-hook.js",

@@ -83,6 +81,6 @@ "test": "jest --selectProjects dom ssr",

"devDependencies": {
"@babel/core": "^7.20.7",
"@babel/core": "^7.20.12",
"@commitlint/cli": "^17.2.0",
"@commitlint/config-conventional": "^17.2.0",
"@commitlint/cz-commitlint": "^17.2.0",
"@commitlint/config-conventional": "^17.4.0",
"@commitlint/cz-commitlint": "^17.4.0",
"@jamesacarr/jest-reporter-github-actions": "^0.0.4",

@@ -107,3 +105,2 @@ "@react-hookz/eslint-config": "^1.7.6",

"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.2.5",

@@ -113,5 +110,6 @@ "@types/js-cookie": "^3.0.2",

"@types/react-dom": "^18.0.6",
"babel-loader": "^9.1.0",
"babel-loader": "^9.1.2",
"commitizen": "^4.2.6",
"commitlint": "^17.2.0",
"commitlint": "^17.4.0",
"concurrently": "^7.6.0",
"husky": "^8.0.3",

@@ -118,0 +116,0 @@ "jest": "^29.3.1",

@@ -39,6 +39,5 @@ <div align="center">

> This package distributed with ESNext language level and ES modules syntax. It helps us to ease the
> support and provide you with the best hooks quality.
> But also this means that depending on your browser target and bundling configuration you might need
> to transpile it. Every major bundler provides a way to transpile `node_modules` fully or partially.
> This package distributed with ESNext language level and both, CJS and ES imports.
> It means that depending on your browser target you might need to transpile it. Every major
> bundler provides a way to transpile `node_modules` fully or partially.
> Address your bundler documentation for more details.

@@ -52,7 +51,9 @@

// or single hook directly
import { useMountEffect } from '@react-hookz/web/useMountEffect';
import { useMountEffect } from '@react-hookz/web/esm/useMountEffect';
```
In case your bundler supports tree-shaking (most of modern does) - both variants are equal and only
necessary code will get into your bundle. Direct hook imports should be considered otherwise.
necessary code will get into your bundle. Direct hook imports should be considered otherwise.
In case, for some reason, you are not able to use ES imports - you should direct-import hooks from
`@react-hookz/web/esm` folder.

@@ -59,0 +60,0 @@ ## Migrating from react-use

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