Skip to content

Commit dd8196d

Browse files
committed
update version
1 parent f876fd5 commit dd8196d

File tree

3 files changed

+193
-6
lines changed

3 files changed

+193
-6
lines changed

index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const useStateRef: UseStateRef = <S>(initialState?: S | (() => S)) => {
1616
const [state, setState] = useState(initialState);
1717
const ref = useRef(state);
1818

19-
const dispatch: typeof setState = useCallback(setStateAction => {
19+
const dispatch: typeof setState = useCallback((setStateAction:any) => {
2020
ref.current = isFunction(setStateAction) ? setStateAction(ref.current) : setStateAction;
2121

2222
setState(ref.current);

package-lock.json

+188
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "react-usestateref",
3-
"version": "1.0.4",
3+
"version": "1.0.7",
44
"description": "useRef and UseState together!",
55
"main": "dist/index.js",
66
"files": [
77
"dist"
88
],
99
"scripts": {
10-
"build": "rimraf dist && tsc",
10+
"build": "npx rimraf dist && tsc",
1111
"deploy": "npm run build && npm version patch && git push && npm publish"
1212
},
1313
"peerDependencies": {
@@ -30,8 +30,7 @@
3030
},
3131
"homepage": "https://github.com/Aminadav/react-useRefState#readme",
3232
"devDependencies": {
33-
"@types/react": "^17.0.16",
34-
"rimraf": "^3.0.2",
35-
"typescript": "^4.3.5"
33+
"@types/react": "^16.0.0",
34+
"typescript": "^4.0.0"
3635
}
3736
}

0 commit comments

Comments
 (0)