Skip to content
This repository was archived by the owner on Dec 31, 2020. It is now read-only.

Commit bfe0a0c

Browse files
committed
Apply fix for #226
2 parents a218f5f + de1a5a6 commit bfe0a0c

File tree

3 files changed

+225
-111
lines changed

3 files changed

+225
-111
lines changed

package.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,31 @@
3838
"react": "^16.8.0"
3939
},
4040
"devDependencies": {
41-
"@size-limit/preset-small-lib": "2.1.4",
42-
"@size-limit/time": "2.1.4",
43-
"@testing-library/jest-dom": "4.1.0",
44-
"@testing-library/react": "9.1.4",
41+
"@size-limit/preset-small-lib": "2.1.6",
42+
"@size-limit/time": "2.1.6",
43+
"@testing-library/react": "9.3.0",
4544
"@testing-library/react-hooks": "1.1.0",
45+
"@testing-library/jest-dom": "4.1.2",
4646
"@types/jest": "24.0.18",
47-
"@types/node": "12.7.4",
48-
"@types/react": "16.9.2",
49-
"@types/react-dom": "16.9.0",
50-
"coveralls": "3.0.6",
51-
"husky": "3.0.5",
47+
"@types/node": "12.7.12",
48+
"@types/react": "16.9.5",
49+
"@types/react-dom": "16.9.1",
50+
"coveralls": "3.0.7",
51+
"husky": "3.0.9",
5252
"jest": "24.9.0",
5353
"jest-environment-jsdom": "24.9.0",
5454
"jest-mock-console": "1.0.0",
55-
"lint-staged": "9.2.5",
56-
"mobx": "5.13.0",
55+
"lint-staged": "9.4.2",
56+
"mobx": "5.14.0",
5757
"prettier": "1.18.2",
5858
"react": "16.9.0",
5959
"react-dom": "16.9.0",
6060
"react-test-renderer": "16.9.0",
6161
"rimraf": "3.0.0",
62-
"size-limit": "2.1.4",
63-
"ts-jest": "24.0.2",
62+
"size-limit": "2.1.6",
63+
"ts-jest": "24.1.0",
6464
"tsdx": "^0.9.1",
65-
"tslint": "5.19.0",
65+
"tslint": "5.20.0",
6666
"tslint-config-prettier": "1.18.0",
6767
"typescript": "3.4.5"
6868
},

src/useObserver.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ export function useObserver<T>(
9797
forceUpdate()
9898
}
9999

100-
return () => reactionTrackingRef.current!.reaction.dispose()
100+
return () => {
101+
reactionTrackingRef.current!.reaction.dispose()
102+
reactionTrackingRef.current = null
103+
}
101104
}, [])
102105

103106
// render the original component, but have the

0 commit comments

Comments
 (0)