Skip to content

Commit

Permalink
fix: useTrackRenders should be usable inside of wrappers
Browse files Browse the repository at this point in the history
This swaps the `ParentWrapper` and `Wrapper` components in the `render` function call, so that calls that require context (e.g. `useTrackRenders`) can also be used in user-supplied `wrapper` options.
  • Loading branch information
phryneas committed Nov 7, 2024
1 parent c3e71b2 commit 19c1378
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/renderStream/createRenderStream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ export function createRenderStream<
wrapper: props => {
const ParentWrapper = options?.wrapper ?? React.Fragment
return (
<ParentWrapper>
<Wrapper>{props.children}</Wrapper>
</ParentWrapper>
<Wrapper>
<ParentWrapper>{props.children}</ParentWrapper>
</Wrapper>
)
},
})
Expand Down

0 comments on commit 19c1378

Please sign in to comment.