@@ -302,7 +302,7 @@ var { ControllerRegistry } = Controllers;
302302ControllerRegistry .registerController (' MoviesApp' , () => MoviesApp);
303303```
304304
305- * ** setRootController(controllerId, animationType = 'none')** - start the app with a root controller
305+ * ** setRootController(controllerId, animationType = 'none', passProps = {} )** - start the app with a root controller
306306
307307``` js
308308// example without animation
@@ -312,6 +312,10 @@ ControllerRegistry.setRootController('MoviesApp');
312312// example with animation, useful for changing your app root during runtime (from a different controller)
313313// animationType: 'none', 'slide-down', 'fade'
314314ControllerRegistry .setRootController (' LoginApp' , ' slide-down' );
315+
316+ // example with props
317+ // these props will be passed to all top components in the layout hierarchy (eg. all tabs, side menus, etc.)
318+ ControllerRegistry .setRootController (' MoviesApp' , ' none' , { greeting: ' hello world' });
315319```
316320
317321#### ` Modal `
@@ -321,7 +325,7 @@ var Controllers = require('react-native-controllers');
321325var { Modal } = Controllers;
322326```
323327
324- * ** showController(controllerId, animationType = 'slide-up')** - display a controller modally
328+ * ** showController(controllerId, animationType = 'slide-up', passProps = {} )** - display a controller modally
325329
326330``` js
327331// example with default slide up animation
@@ -331,6 +335,10 @@ Modal.showController('MoviesApp');
331335// example without animation
332336// animationType: 'none', 'slide-up'
333337Modal .showController (' LoginApp' , ' none' );
338+
339+ // example with props
340+ Modal .showController (' MoviesApp' , ' slide-up' , { greeting: ' hello world' });
341+
334342```
335343
336344 * ** dismissController(animationType = 'slide-down')** - dismiss the current modal controller
0 commit comments