Gotchas

Potential Error Messages#


No "routes" found in navigation state. to fix this error message, view code block one on adding-an-app


The navigation prop is missing for this navigator. to fix this error message, view code block two on adding-an-app


Same Route Namings#

As you add more and more apps to protocapsule, be aware of the route naming conventions, and take into consideration prefixing each route with the specific app name.

Below is an example of two apps with the same tab navigation route namings:

/src/apps/music/App.js
const BottomTabNavigator = createBottomTabNavigator(
{
StackHome: StackHome
...
/src/apps/stream/App.js
const BottomTabNavigator = createBottomTabNavigator(
{
StackHome: StackHome
...

As you can see above, the route names are both StackHome, to prevent this, take a look at the next two blocks, prefixing the app name to provide different route naming conventions.

/src/apps/music/App.js
const BottomTabNavigator = createBottomTabNavigator(
{
MusicStackHome: StackHome
...
/src/apps/stream/App.js
const BottomTabNavigator = createBottomTabNavigator(
{
StreamStackHome: StackHome
...

Now MusicStackHome and StreamStackHome are two different routes.