futurice/pepperoni-app-kit

how add new module (plop) in (stack) navigation?

KarlsDad opened this issue · 0 comments

how can add a new module,

  1. npm install -g plop
  2. run plop $ plop module
  3. also fine ... ? Module name (Casing will be modified) chat ? Module name (Casing will be modified) chat [SUCCESS] add \src\modules\chat\ChatState.js [SUCCESS] add \src\modules\chat\ChatView.js [SUCCESS] add \src\modules\chat\ChatViewContainer.js [SUCCESS] modify \src\redux\reducer.js [SUCCESS] modify \src\redux\reducer.js

but how can i implement the new module to navigation?

Navgiator.js
import ChatViewContainer from '../chat/ChatViewContainer'; <------------- add
// TabNavigator is nested inside StackNavigator export const MainScreenNavigator = TabNavigator({ Counter: {screen: CounterViewContainer}, Color: {screen: ColorViewContainer}, Chat: {screen: ChatViewContainer} <------------- add

// Root navigator is a StackNavigator const AppNavigator = StackNavigator({ Home: {screen: MainScreenNavigator}, InfiniteColorStack: {screen: ColorViewContainer}, ChatStack: {screen: ChatViewContainer} <--------------- add

but nothing changed, whats wrong?