Skip to content

Commit

Permalink
Add readme for debug and bump version to 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jleider committed Dec 30, 2021
1 parent 50ff206 commit 40dd54d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ useStableEffect(() => {
}, [data], Eq.getTupleEq(O.getEq(Eq.eqString)));
```

## Debugging Your Hooks

You can console log the reasons behind why certain hooks are called again by passing a debug flag to each one of the
stable hooks which have equality functions provided in the API. The last parameter of the function is now a config
object: `StableHookOptions`.

You can pass `{debug: true}` to have the console logs printed in all environments except for `production`.

## API

| React Hook | Stable Hook | Description |
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fp-ts-react-stable-hooks",
"version": "1.3.0",
"version": "1.4.0",
"description": "Stable hooks for react using FP-TS equality checks instead of shallow (reference) object comparison",
"main": "dist/lib/index.js",
"module": "dist/es2015/index.js",
Expand Down

0 comments on commit 40dd54d

Please sign in to comment.