←back to thread

446 points talboren | 2 comments | | HN request time: 0.554s | source
Show context
adithyassekhar ◴[] No.45040524[source]
This thread has really opened my eyes to how much the world hates react developers, I am one.

Unrealistic timelines, implementing what should be backend logic in frontend, there's a bunch of ways SPA's tend to be a trap. Was react a bad idea? Can anyone point to a single well made react app?

replies(13): >>45040699 #>>45040711 #>>45040798 #>>45040947 #>>45041164 #>>45041374 #>>45041377 #>>45041379 #>>45041735 #>>45043250 #>>45043659 #>>45047956 #>>45050341 #
hliyan ◴[] No.45047956[source]
Been a huge React/SPA fan for many years, until the realization began to creep on me that building them was actually harder than building C++ MFC desktop applications (which I did back in the 2000's). Declarative markup was supposed to reduce cognitive load, but it now feels like the interplay between the declarative part of UI development (component markup) and the procedural part (event handling and state) has slowly morphed into something more complex than simplly developing the UI procedurally.

Back in the day (I was a junior dev) this was easier than grappling with React hooks today:

    BOOL CMainDialog::OnInitDialog()
    {
        CDialogEx::OnInitDialog();
        m_pPropertySheet = new CMyPropertySheet(_T("My Tabbed Dialog"), this);
        m_pPropertySheet->Create(this, WS_CHILD | WS_VISIBLE, WS_EX_CONTROLPARENT);

        CRect rectMainDialog;
        GetClientRect(&rectMainDialog);
        CRect rectPropertySheet(10, 10, rectMainDialog.Width() - 20, rectMainDialog.Height() - 20); 
        m_pPropertySheet->MoveWindow(rectPropertySheet);

        return TRUE; 
    }
replies(2): >>45048352 #>>45048393 #
1. winrid ◴[] No.45048352[source]
Last couple years I built a largish javafx app and this was the entire way I structured it. A little tedious, but if I have a state management issue it's just logic on my side and not ten layers of abstraction.
replies(1): >>45048397 #
2. hliyan ◴[] No.45048397[source]
That's a good way to put it. A bit tedious, but the mental model is relatively simple. Reading and writing code feels a little closer to riding a bicycle than operating a Rube-Goldberg device.