diff --git a/src/createSharedElementScene.tsx b/src/createSharedElementScene.tsx index a5c4cf3..791b25e 100644 --- a/src/createSharedElementScene.tsx +++ b/src/createSharedElementScene.tsx @@ -23,6 +23,7 @@ function createSharedElementScene( rendererData: ISharedElementRendererData ): React.ComponentType { class SharedElementSceneView extends React.PureComponent { + private initial: boolean = true; private subscriptions: { [key: string]: SharedElementEventSubscription; } = {}; @@ -82,7 +83,8 @@ function createSharedElementScene( private onWillFocus = () => { const sharedElements = this.getSharedElements(); - if (sharedElements) { + if (sharedElements && this.initial) { + this.initial = false; rendererData.willActivateScene(this.sceneData, sharedElements); } };