Skip to content

Commit

Permalink
Merge 6b8dced into e71f089
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhu2000 committed Dec 13, 2022
2 parents e71f089 + 6b8dced commit 7588ef8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# useBetterEffect

[![npm version](https://img.shields.io/npm/v/use-better-effect.svg)][npm_url]
[![downloads](https://img.shields.io/npm/dt/use-better-effect.svg)][npm_url]
![license](https://img.shields.io/npm/l/use-better-effect.svg)
![size](https://img.shields.io/bundlephobia/minzip/use-better-effect)

[![Coverage Status](https://coveralls.io/repos/github/davidhu2000/use-better-effect/badge.svg?branch=main)](https://coveralls.io/github/davidhu2000/use-better-effect?branch=main)
![Dependency Count](https://badgen.net/bundlephobia/dependency-count/use-better-effect)
![Types Included](https://img.shields.io/npm/types/use-better-effect)
![Tree Shaking Supported](https://badgen.net/bundlephobia/tree-shaking/use-better-effect)

[npm_url]: https://www.npmjs.org/package/use-better-effect

A wrapper around `React.useEffect` but with improved API

## Installation
Expand Down
2 changes: 1 addition & 1 deletion src/use-better-effect.hook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe("useBetterEffect", () => {
{ initialProps: { dependencies: [1, 2, 3] } }
);
expect(callbackFn).toHaveBeenCalledTimes(1);
rerender({ dependencies: [1, 2, 3, 4] });
rerender({ dependencies: [2, 3, 4] });
expect(callbackFn).toHaveBeenCalledTimes(2);
});

Expand Down

0 comments on commit 7588ef8

Please sign in to comment.