4 ms·
> That doesn't look like what I was talking about. He basically has an entire new component for every possible state - and the state here is just a single varia
by TuringTest 9y ago
> That doesn't look like what I was talking about. He basically has an entire new component for every possible state - and the state here is just a single variable.
With reactive programming being primarily functional, it should be relatively easy to refactor the output of a tool like this. You could split the states into its common components, maybe even using visual tools in the designer itself without having to touch the generated code.
I don't know if this tool will be able to do that, but I've seen that approach used in mockup tools for rapid prototyping. The only part missing in those tools to allow the interface designer to build the interaction logic by themselves was a sane code generator. With a language like React, I believe the generated code will resemble something usable, which was impossible when UI designers generated imperative or object-oriented code.