Hi!
I’m playing with the idea to add a state-based automatic UI rebuild (a.k.a declarative UI) to my framework (https://zakadabar.io), mostly for the JS target.
I used React before and also I’ve checked Compose (core and web) but they do not solve my base problem: handling complex (i.e. 50+ fields) forms effectively. This is not a problem for mobiles where you rarely handle such a complexity, but it is a problem on the web.
As I see all these solutions are great when you start, but when you have to handle complex relations between components, you have to add so much supporting code that they loose their main advantages.
I’ve been thinking about this and my conclusion at the moment is that the problem is that all these frameworks are not capable to delegate fragments of states to lower level components.
Let me explain with an example:
- You have a list of cards.
- Each card has an input field.
- What happens when the user changes the value in the input field?
Most probably you pass a callback to the Input component that sends an event to change the state somewhere else.
And this “callback” and “somewhere else” is my real problem.
As I see, the card and the input field should get a “state fragment” and change it without knowing what happens after the change. The change itself (a.value = 12
) should notify the framework that there has been a state change, and from then it is basically the same as React or Compose.
I would be grateful if anyone could point me to information about how to handle complexity without adding many-many boilerplate, stores, actions (been there, done that) just to edit one record type.
I know that I could solve this by tailoring the Compose compiler plugin, but I’m not sure that it is the best options, hence asking here.
Thank you for your help.