- React only on any action of types:
- Selection of an entry. An entry was just selected so we should try to load its data.
- User login success. Since an entry may be selected but not a user, only after the user is ok we can try to load the entry.
- Page load. Similar to the user login check. Only on the correct page we can load the entry.
- React only on these pre-condition:
- Correct page id
- user logged in
- If current selected entry id is null:
- Chain an action setting editing status to READY
- Set editing data to empty
- End the epic
- If current editing state is CHANGED:
- No action. User is the middle of changing something so do not load an entry.
- End the epic
- If current selected entry id and user id are both non null:
- Ask the data layer to start the load of the corresponding entry
- Chain an action setting editing status to LOADING
- When having the database result:
- Chain an action setting editing status to READY
- Chain an action setting editing data to the data received
- End the epic
Last active
September 27, 2017 16:18
-
-
Save akaztp/e56e851ecc472e7ae398970d49270fe7 to your computer and use it in GitHub Desktop.
Epics outline for case study on article "Web app architecture based on Redux".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For article Web app architecture based on Redux