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

Commit 6e52a4a

Browse files
committed
Clarify variable naming in Component
1 parent e548b24 commit 6e52a4a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/Component.lua

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ end
158158
]]
159159
function Component:_update(newProps, newState)
160160
self._canSetState = false
161-
local willUpdate = self:shouldUpdate(newProps or self.props, newState or self.state)
161+
local doUpdate = self:shouldUpdate(newProps or self.props, newState or self.state)
162162
self._canSetState = true
163163

164-
if willUpdate then
164+
if doUpdate then
165165
self:_forceUpdate(newProps, newState)
166166
end
167167
end
@@ -173,6 +173,7 @@ end
173173
]]
174174
function Component:_forceUpdate(newProps, newState)
175175
self._canSetState = false
176+
176177
if self.willUpdate then
177178
self:willUpdate(newProps or self.props, newState or self.state)
178179
end
@@ -220,10 +221,10 @@ end
220221
function Component:_reify(handle)
221222
self._handle = handle
222223

223-
local vdom = self:render()
224-
if vdom then
224+
local virtualTree = self:render()
225+
if virtualTree then
225226
handle._reified = Reconciler._reifyInternal(
226-
vdom,
227+
virtualTree,
227228
handle._parent,
228229
handle._key,
229230
self._context

0 commit comments

Comments
 (0)