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`