Skip to content

Commit 34e2450

Browse files
committed
[feat] Add debug prop for v5
1 parent d4b0889 commit 34e2450

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/createSharedElementStackNavigator.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,15 @@ export default function createSharedElementStackNavigator<
9292
null
9393
);
9494

95-
// TODO
96-
/* componentDidMount() {
97-
if (debug) {
95+
if (debug) {
96+
React.useEffect(() => {
9897
rendererDataProxy.addDebugRef();
99-
}
98+
return function cleanup() {
99+
rendererDataProxy.releaseDebugRef();
100+
};
101+
});
100102
}
101103

102-
componentWillUnmount() {
103-
if (debug) {
104-
rendererDataProxy.releaseDebugRef();
105-
}
106-
}*/
107-
108104
return (
109105
<SharedElementRendererContext.Consumer>
110106
{rendererData => {

0 commit comments

Comments
 (0)