futurice / futurice/pepperoni-app-kit
how add new module (plop) in (stack) navigation?
- Dominant language
- JavaScript
- Stars
- 4.6k
- Forks
- 631
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with Navigator.js and the generated src/modules/chat files, then inspect src/redux/reducer.js and the plop module generator output. Reproduce the navigation setup described in the issue and verify the Chat screen appears in the intended navigator; done means the new module is reachable from navigation without breaking existing screens.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native, redux
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100