|
|
|
|
|
by muzani
137 days ago
|
|
Async really turns FE into a nightmare. Simple concept: user logs in, get userID, get feed associated with ID, get posts on feed, get reacts on post. Sometimes the tech debt is that BE can't pass this data all at once yet. Fine. Let's fetch it. But then FE gets creative. We can reduce nesting. We can chain it. We can preload stuff before the data loads. Instead of polling, let's do observers. Actually these aren't thread safe. And you know what, nothing should be in the UI thread because they'll cause delays. And this code isn't clean, one function should do only one thing. Actually why are these screens even connected? We should use global variables and go to any screen from anywhere. Actually everything can be global. But global is an anti-pattern. So let's call it DI and single page application and have everything shared but everything must also be a singleton because shared immutability is bad too. |
|