Skip to content

Instantly share code, notes, and snippets.

@justinvdm
Created September 29, 2016 14:24
Show Gist options
  • Save justinvdm/0be1e446abf6a8c32fe33e8669732a7c to your computer and use it in GitHub Desktop.
Save justinvdm/0be1e446abf6a8c32fe33e8669732a7c to your computer and use it in GitHub Desktop.
diff --git a/src/components/Stepper/index.js b/src/components/Stepper/index.js
index e048eeb..99a9258 100644
--- a/src/components/Stepper/index.js
+++ b/src/components/Stepper/index.js
@@ -13,6 +13,9 @@ const Step = ({
);
+const renderScene = children => ({ scene: { index } }) => (children[index]);
+
+
const Stepper = ({
children,
navigationState,
@@ -32,7 +35,7 @@ const Stepper = ({
{progressBar}
<NavigationCardStack
navigationState={navigationState}
- renderScene={() => children[navigationState.index]}
+ renderScene={renderScene(children)}
/>
</BaseView>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment