We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12385e3 commit c072c02Copy full SHA for c072c02
1 file changed
src/view.js
@@ -4,7 +4,6 @@ import { hasHooks } from './utils'
4
5
export let isInsideFunctionComponent = false
6
const COMPONENT = Symbol('owner component')
7
-const DUMMY_STATE = {}
8
9
export default function view(Comp) {
10
const isStatelessComp = !(Comp.prototype && Comp.prototype.isReactComponent)
@@ -22,7 +21,7 @@ export default function view(Comp) {
22
21
const render = useMemo(
23
() =>
24
observe(Comp, {
25
- scheduler: () => setState(DUMMY_STATE),
+ scheduler: () => setState({}),
26
lazy: true
27
}),
28
[]
@@ -56,7 +55,7 @@ export default function view(Comp) {
56
55
57
// create a reactive render for the component
58
this.render = observe(this.render, {
59
- scheduler: () => this.setState(DUMMY_STATE),
+ scheduler: () => this.setState({}),
60
61
})
62
}
0 commit comments