Skip to content

Commit

Permalink
renderResult -> pendingResult
Browse files Browse the repository at this point in the history
Conceptually the state is pending to be committed. So this makes more sense than tying it to "render"
  • Loading branch information
eps1lon committed Nov 22, 2021
1 parent 850a3f7 commit 225524d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pure.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ function renderHook(renderCallback, options = {}) {
const result = React.createRef()

function TestComponent({renderCallbackProps}) {
const renderResult = renderCallback(renderCallbackProps)
const pendingResult = renderCallback(renderCallbackProps)

React.useEffect(() => {
result.current = renderResult
result.current = pendingResult
})

return null
Expand Down

0 comments on commit 225524d

Please sign in to comment.