Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
zJaaal committed Oct 20, 2022
2 parents 66afed7 + 89e8f9c commit 58859b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This hook only take one argument that should be a ref to an HTML Element. This h
```js
//TypeScript
function Example() {
const ref = useRef <HTMLDivElement>(null);
const ref = useRef < HTMLDivElement > null;

//I'm destructuring the object but you can easily use it without destructuring
const { x, y } = useProximity(ref);
Expand Down Expand Up @@ -139,4 +139,4 @@ function Example() {

## Directions enum

This lib provides an enum for TypeScript users, it just has two properties at the moment: Directions.up, Directions.down, Directions.right and Directions.left that returns the value of "UP", "DOWN" "RIGHT" and "LEFT", you can use it as helper for useDirection hook.
This lib provides an enum for TypeScript users, it just has four properties at the moment: Directions.up, Directions.down, Directions.right and Directions.left that returns the value of "UP", "DOWN" "RIGHT" and "LEFT", you can use it as helper for useDirection hook.

0 comments on commit 58859b3

Please sign in to comment.