Directory

The recommended directory structure

  1. sample_page
  2. -- action.dart /// define action types and action creator
  3. -- page.dart /// config a page or component
  4. -- view.dart /// define a function which expresses the presentation of user interface
  5. -- effect.dart /// define a function which handles the side-effect
  6. -- reducer.dart /// define a function which handles state-change
  7. -- state.dart /// define a state and some connector of substate
  8. components
  9. sample_component
  10. -- action.dart
  11. -- component.dart
  12. -- view.dart
  13. -- effect.dart
  14. -- reducer.dart
  15. -- state.dart

The upper layer is responsible for assembly and the lower layer is responsible for implementation.