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:-
  1. Mounting
  2. Updating
  3. Unmounting
  4. Error Handling

User Action Methods:-

  1. Button Trigger Methods
  2. Input Text Methods
  3. API Call Methods(async)

UI - render() method

  1. Styles imported from common/styles
  2. Colors imported from common/colors
  3. Components imported from components
  4. Images from common/images
  5. Basic Components from react-native
  6. Getting CurrentUser reducer as props from state using mapStateToProps
  7. Trigger Action from /store/actions using mapDispatchToProps : dispatch(action)

Connecting Class to redux methods

  1. mapDispatchToProps for dispatching action
  2. mapStateToProps to get state values to props
  3. connect
export default connect(null, mapDispatchToProps)(SignupPage);
  1. if no redux connecting need , export the class directly
export default class SignUpFormPage extends React.Component {