3

Version Tell us which versions you are using:

react-native-router-flux v4.0.0-beta.28
react-native v0.52.2

Tried the following...

Actions.replace({ key: tabKey, props: tabPage }); Actions[key]({ type: ActionConst.REPLACE, tabPage: tabPage })

and several variations there of

Anzil khaN
  • 1,974
  • 1
  • 19
  • 30
muppet11
  • 43
  • 1
  • 7

2 Answers2

2

I would recommend to try the most recent version - but if that's not possible, move to the last beta that was still using react-navigation 1.5 - there is a branch for that version only now (4.0.0-beta) and then use the execute method.

Actions.execute('replace', tabKey, { tabPage });

And I believe the two examples you showed are not correct too, but I might be wrong, the number of changes during the work in this beta version was huge, but according to the code/API docs, this is the way you were supposed to be doing it:

Actions.replace(tabKey, { tabPage });

// or 

Actions[tabKey]({ tabPage }); // and use type={ActionsConst.REPLACE} on your `Scene`
Davis Z. Cabral
  • 514
  • 3
  • 12
0

you most use Actions.replace('tab name'); and this work

abbas derafshi
  • 307
  • 1
  • 11