You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It can work with leptos fine, but it is not entirely frictionless in SSR mode: you have to define all the query types twice, once for the backend (these types are generated by cornucopia) and once for the front-end (manually re-define all the types you're interested in).
You can't currently use cornucopia's generated types in the front-end directly because of all the additional dependencies on futures, GenericClient, tokio_postgres etc. which will break the front-end build with the dreaded slew of mio errors.
As an alternative to WET, you could maybe write a macro to extract the front-end types, but that would be quite brittle to cornucopia changes.
My strategy is to wait for PR#211 to land and hope that in its final form I can use the types from that (not possible in its current state).
Seems like this is no different from sqlx with leptos: in leptos-heavy-metal-stack you can see where Todo is declared twice (lines 22, 29).
It would be great to show the query result on the webpage.
like use Loptos to build a web UI and show the result in a table, like leptos-struct-table.
Hope there will be a simple demo to make cornucopia and Leptos work together.
The text was updated successfully, but these errors were encountered: