• ☆ Yσɠƚԋσʂ ☆OP
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    2 years ago

    I find nowadays, htmx is probably a good enough solution for most UIs. It just treats the UI as a dumb terminal that renders content and collects user input. Then all the actual logic moves to the backend.

    Personally, I’m a fan of a reactive model where the UI simply represents the state of the data. I think a lot of the complexity in React comes from the fact that it’s not opinionated regarding when a component should repaint. You have a lifecycle and it’s up to you to decide what to do within it and when.

    But you could just eliminate all but the render part of the lifecycle, and then just have reactive components observe the data and repaint when it changes. It’s a much simpler and more predictable model.