This is how data flows through the app:
- Server pushes data to the disk of any client (Server -> Pusher event -> Action listening to pusher event ->
Onyx.update()). - Disk pushes data to the UI (Onyx ->
useOnyx()-> React component). - UI pushes data to people's brains (React component -> device screen).
- Brain pushes data into UI inputs (Device input -> React component).
- UI inputs push data to the server (React component -> Action -> XHR to server).
- Go to 1
When adding new API commands, always prefer to return the created/updated data in the command itself, instead of saving and reloading. For example: if we call CreateTransaction, we SHOULD prefer making CreateTransaction return the data it just created instead of calling CreateTransaction then Get rvl=transactionList.
