From 19c1378e31c16fe802cd298b66f1795686d59ec7 Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Thu, 7 Nov 2024 10:03:17 +0100 Subject: [PATCH] fix: `useTrackRenders` should be usable inside of wrappers 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. --- src/renderStream/createRenderStream.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderStream/createRenderStream.tsx b/src/renderStream/createRenderStream.tsx index 2c87ffe46..abb7596f8 100644 --- a/src/renderStream/createRenderStream.tsx +++ b/src/renderStream/createRenderStream.tsx @@ -256,9 +256,9 @@ export function createRenderStream< wrapper: props => { const ParentWrapper = options?.wrapper ?? React.Fragment return ( - - {props.children} - + + {props.children} + ) }, })