Socket
Socket
Sign inDemoInstall

@reach/rect

Package Overview
Dependencies
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/rect - npm Package Compare versions

Comparing version 0.17.0 to 0.18.0-pre.0

CHANGELOG.md

34

package.json
{
"name": "@reach/rect",
"version": "0.17.0",
"version": "0.18.0-pre.0",
"description": "Measure React elements position in the DOM",

@@ -17,10 +17,11 @@ "author": "React Training <hello@reacttraining.com>",

"@reach/observe-rect": "1.2.0",
"@reach/utils": "0.17.0",
"prop-types": "^15.7.2",
"tiny-warning": "^1.0.3",
"tslib": "^2.3.0"
"@reach/utils": "0.18.0-pre.0"
},
"devDependencies": {
"@reach-internal/dev": "0.0.0",
"@reach-internal/test": "0.0.0",
"@reach-internal/tsconfig": "0.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react-dom": "^17.0.2",
"tsup": "^6.1.3"
},

@@ -31,14 +32,17 @@ "peerDependencies": {

},
"main": "dist/reach-rect.cjs.js",
"module": "dist/reach-rect.esm.js",
"types": "dist/reach-rect.cjs.d.ts",
"main": "./dist/index.cjs.js",
"types": "./dist/index.d.ts",
"files": [
"CHANGELOG.md",
"LICENSE",
"README.md",
"dist"
],
"eslintIgnore": [
"node_modules",
"dist"
],
"gitHead": "d206aefac2bede58c06a54b18d48eee7537096e0"
}
"publishConfig": {
"access": "public"
},
"module": "./dist/index.mjs",
"scripts": {
"build": "tsup"
}
}

@@ -10,21 +10,21 @@ # @reach/rect

```jsx
import Rect, { useRect } from "@reach/rect";
import { Rect, useRect } from "@reach/rect";
function Example() {
const ref = React.useRef();
const rect = useRect(ref);
const ref = React.useRef();
const rect = useRect(ref);
return (
<div>
<pre>{JSON.stringify(rect, null, 2)}</pre>
<div
ref={ref}
contentEditable
dangerouslySetInnerHTML={{
__html: "Edit this to change the size!",
}}
/>
</div>
);
return (
<div>
<pre>{JSON.stringify(rect, null, 2)}</pre>
<div
ref={ref}
contentEditable
dangerouslySetInnerHTML={{
__html: "Edit this to change the size!",
}}
/>
</div>
);
}
```

Sorry, the diff of this file is not supported yet

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