Skip to content

Commit 01710bc

Browse files
committed
little readme refinements and removed dummy test file
1 parent 3eed6fd commit 01710bc

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ Shared React variables provide you easy and comfortable mutable state management
1515

1616
```tsx
1717
const [
18-
// returns a mutable state
18+
// returns a mutable object
1919
useTimer,
20-
// use it to rewrite the whole variable,
21-
// normally you don't need it
20+
// use it to rewrite the whole object,
21+
// you don't need it usually
2222
useTimerRewrite
2323
] = createUseSharedVariable({ ticks: 0 });
2424

2525
const Timer = () => {
26-
// using timer state
26+
// using shared react variable
2727
const timer = useTimer();
2828
useEffect(() => {
2929
setInterval(() => {
30-
// state is mutable
30+
// object is mutable
3131
timer.ticks++;
3232
}, 1000);
3333
}, []);
@@ -36,7 +36,7 @@ const Timer = () => {
3636
};
3737

3838
const AnotherTimerWithSameState = () => {
39-
// using same timer state in another component
39+
// using the same variable in another component
4040
const timer = useTimer();
4141

4242
return <div>{timer.ticks}</div>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alevnyacow/shared-react-variables",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Easy and comfortable React state manager",
55
"main": "transpiled/index.js",
66
"scripts": {

tests/dummy.test.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/test-application/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@alevnyacow/shared-react-variables": "file:../../alevnyacow-shared-react-variables-2.0.0.tgz",
6+
"@alevnyacow/shared-react-variables": "file:../../alevnyacow-shared-react-variables-2.0.1.tgz",
77
"@testing-library/jest-dom": "^5.16.2",
88
"@testing-library/react": "^12.1.4",
99
"@testing-library/user-event": "^13.5.0",

0 commit comments

Comments
 (0)