Hacker News new | past | comments | ask | show | jobs | submit login

As I understand it, what you’re asking for is fundamentally incompatible with the paradigm itself (at least in a clean way).

The whole programming experience of declarative UIs is predicated on the fact that you’re manipulating lightweight structs (really just state representations) that are rendered into heavyweight views by the system only where necessary (determined by diffing the state changes).

React’s refs are an attempted answer to this very problem, and they get nasty fast.




> you’re manipulating lightweight structs that are rendered into heavyweight views by the system

Yes, and I’m arguing that not exposing the ‘heavyweight views’ to the programmers at all is a mistake.


Yup, and my understanding of the problem is that if you expose the heavy weight views to the state layer (structs) and allow direct manipulation, render calls lose incompetency, the structs are no longer the source of state truth and the whole abstraction gets terribly leaky.

Edit: once again I think it’s important to look at the limitations and advantages of prior work in this area and I believe React refs to be a good case study in that.


Oops autocomplete. Incompetency should be idempotency.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: