From 7d268d7a5cce137718a5d7cc6695f2c381119925 Mon Sep 17 00:00:00 2001 From: Zach Gibb Date: Tue, 16 Feb 2016 11:52:55 -0500 Subject: [PATCH] Allow instance methods to be accessed from the component directly --- index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.js b/index.js index ed1108f..87de20a 100644 --- a/index.js +++ b/index.js @@ -276,6 +276,16 @@ class Router extends React.Component { margin = Styles.NAV_BAR_HEIGHT; } + this.toRoute = goForward; + this.toBack = goBackwards; + this.replaceRoute = replaceRoute; + this.resetToRoute = resetToRoute; + this.reset = goToFirstRoute; + this.setRightProps = setRightProps; + this.setLeftProps = setLeftProps; + this.setTitleProps = setTitleProps; + this.customAction = customAction; + return (