algolia/autocomplete

VUE Autocomplete return instead of JSX from a VUE Component

antoniszaravelas opened this issue · 1 comments

Hello everybody,

I wanted to ask, if Algolia has already or if there is a plan of a future implementation , where the return statement of the template of autocomplete is instead of a JSX or HTML a VUE component, where we can pass the necessary props that we need so we avoid big block of code like this :

return ( <div className="aa-ItemWrapper"> <div className="aa-ItemContent"> <div className="aa-ItemIcon"> <img src={item.image} alt={item.name} width="40" height="40" /> </div> <div className="aa-ItemContentBody"> <div className="aa-ItemContentTitle"> <components.Snippet hit={item} attribute="name" /> </div> <div className="aa-ItemContentDescription"> <components.Snippet hit={item} attribute="description" /> </div> </div> </div> </div> );

We don't have plans for this yet, but you can pass createElement and Fragment from Vue wrapped as in the guide to use Vue completely