Render a component referenced by a object

How van I render a component that is referenced by an object instead of just writing the tag directly? For example I'd have a store where I want to programmatically change what ckind of editor is supported:
function View() {
const [store,setStore] = createStore([{label:'text',form:TextForm}])
return <For each={f=> ??? }</For>
}
function View() {
const [store,setStore] = createStore([{label:'text',form:TextForm}])
return <For each={f=> ??? }</For>
}
Something like f.form does not work here. Maybe this is not a good idea and I should just use a type attribute in the object and check with an if when rendering, but I was wondering more if this is an option at all.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server