Connecpath Workflow - Shaunakdas/doc_genius_ref GitHub Wiki
Adding a page
- Navigation in App.js: Navigator object and corresponding list of pages in getNavigator() method
- Creating page in folder pages.
- In Page Class, adding variables: type of variable(static propTypes), default value (static defaultProps), state variables (constructor(props)).
- Lifecycle Methods:-
- Mounting
- Updating
- Unmounting
- Error Handling
User Action Methods:-
- Button Trigger Methods
- Input Text Methods
- API Call Methods(async)
UI - render() method
- Styles imported from common/styles
- Colors imported from common/colors
- Components imported from components
- Images from common/images
- Basic Components from react-native
- Getting CurrentUser reducer as props from state using mapStateToProps
- Trigger Action from /store/actions using mapDispatchToProps : dispatch(action)
Connecting Class to redux methods
- mapDispatchToProps for dispatching action
- mapStateToProps to get state values to props
- connect
export default connect(null, mapDispatchToProps)(SignupPage);
- if no redux connecting need , export the class directly
export default class SignUpFormPage extends React.Component {