Skip to content

Commit ea1e558

Browse files
authored
chore: add badges to readme, fix failed test (#5)
2 parents e71f089 + 6b8dced commit ea1e558

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# useBetterEffect
22

3+
[![npm version](https://img.shields.io/npm/v/use-better-effect.svg)][npm_url]
4+
[![downloads](https://img.shields.io/npm/dt/use-better-effect.svg)][npm_url]
5+
![license](https://img.shields.io/npm/l/use-better-effect.svg)
6+
![size](https://img.shields.io/bundlephobia/minzip/use-better-effect)
7+
8+
[![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)
9+
![Dependency Count](https://badgen.net/bundlephobia/dependency-count/use-better-effect)
10+
![Types Included](https://img.shields.io/npm/types/use-better-effect)
11+
![Tree Shaking Supported](https://badgen.net/bundlephobia/tree-shaking/use-better-effect)
12+
13+
[npm_url]: https://www.npmjs.org/package/use-better-effect
14+
315
A wrapper around `React.useEffect` but with improved API
416

517
## Installation

src/use-better-effect.hook.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe("useBetterEffect", () => {
9797
{ initialProps: { dependencies: [1, 2, 3] } }
9898
);
9999
expect(callbackFn).toHaveBeenCalledTimes(1);
100-
rerender({ dependencies: [1, 2, 3, 4] });
100+
rerender({ dependencies: [2, 3, 4] });
101101
expect(callbackFn).toHaveBeenCalledTimes(2);
102102
});
103103

0 commit comments

Comments
 (0)