teleport-code-generators icon indicating copy to clipboard operation
teleport-code-generators copied to clipboard

Implement smart conditional renders

Open alexnm opened this issue 5 years ago • 2 comments

We had this implemented (#89 and #103) but with the new UIDL structure, this has to be thought differently. Perhaps we can have a step in the resolver that looks at boolean conditionals and decides if two conditionals which are one after another can be written in a smarter way:

  • ternary in react: { condition ? (branch - true) : (branch - false)
  • v-if/v-else in vue

alexnm avatar Apr 16 '19 13:04 alexnm

Do you mean we could check UIDL and decide we can group conditionals together?

vladnicula avatar Apr 22 '19 08:04 vladnicula

yes, like a step before the pipeline processing

alexnm avatar Apr 22 '19 11:04 alexnm