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 212e818 commit 93a5b8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pure.js
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 93a5b8e

Please sign in to comment.