Data Flow
The data-flow diagram
+-------------+
1 user input | |
+----------------> A Component |
| |
+-----------^-+ +------------------------------+
| | | |
2 State changing | | 8 Container updates | Magento (GraphQL server) <---+
user interaction | | props of child component | | |
| | +------------------------^-----+ |
+------------------------+ | |
| | | |
| B Container | | |
| | NO The data is requested from server | |
| Does it affect global +--------------------------------------------+ |
| state? | |
| | |
+------------------------+ |
Y| | Helpers are invoked |
* NOTE #1 E| +--------------------------------------+ |
S| | |
+--v---------------------+ | |
| | +---v---------------------------+ |
| Is action result | | | |
+----> synchronous? | | E Utility / Helper function | |
| | | | | |
| +------------------------+ +------------------^------------+ |
| | | | | |
| Y | N | 3 Payload is passed to | | |
| E | O | asynchronous action dispatcher | | |
| S | | | | |
| | +------------v----------+ 4 Helpers are invoked | | |
| | | +-----------------------------+ | |
| | | C Action Dispatcher | | |
| | | <----------------------------------------+ |
| | +-----------------------+ 5 Asynchronous response is returned |
| | | | |
| | | | The data is requested from server |
| | | +-----------------------------------------------------+
| | |
| | |
| | | +--------------------+
| | | | |
| +--------v-------------------> D Action Reducer +----+
| 6 Action is dispatched | | |
| +--------------------+ |
| |
+--------------------------------------------------------------+
7 Action result updates the stateWho are the main actors?
What is going on?
Last updated