BuilderIO/mitosis

Will the Show component support vue-like v-if v-else-if v-else in the future?

wabi-habi opened this issue · 3 comments

I am interested in helping provide a feature!

Yes

Which generators are impacted?

  • All
  • Angular
  • HTML
  • Qwik
  • React
  • React-Native
  • Solid
  • Stencil
  • Svelte
  • Vue
  • Web components

What problem does this feature solve?

Will the Show component support vue-like v-if v-else-if v-else in the future?`

What does the proposed API look like?

<Show if={xxx}>
</Show>

<Show elseIf={xxx}>
</Show>

<Show else>
</Show>

Additional Information

No response

No current plans for this, but it could be interesting to implement! React, Vue, Qwik, Svelte would work out of the box. Would need to thin through the ones that don't (like Solid, whose <Show> only has a when and fallback.

No current plans for this, but it could be interesting to implement! React, Vue, Qwik, Svelte would work out of the box. Would need to thin through the ones that don't (like Solid, whose <Show> only has a when and fallback.

OK, it's great, if there's anything I can do, I'll help!