Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: Is there a point to keeping the gloo-net client? #35

Closed
SleeplessOne1917 opened this issue Oct 19, 2023 · 3 comments
Closed

Comments

@SleeplessOne1917
Copy link
Member

Currently, the LemmyClient trait is implemented for both the awc client and a placeholder Fetch struct which uses gloo-net. I take it that the point of the browser client is to be able to make requests from the browser when needed. However, with Leptos's server function feature, I question if this is necessary: browser-side calls of server functions use a stub that uses the browser's native fetch API. With this in mind, is there a reason to keep this logic? Stripping it would make the client implementation much simpler.

@jim-taylor-business
Copy link
Contributor

it is a fundamental part of the Leptos SSR Hydrate CSR pattern that we are still following so i don't see the need for this.

i don't know if gloo is bundled inside Leptos and is available for use, so we could use that instead of an explicit dependency.

maybe we can focus on fixing existing issues (Navigation) and old features that have been disabled since the client refactoring (PostActivity).

@jim-taylor-business
Copy link
Contributor

jim-taylor-business commented Oct 20, 2023

proxying everything, as we currently are, through the UI server is not a pattern i have seen before and is only nice in Leptos because of SSR and ActionForms.

it is common to progressively enhance to the browser communicating directly with the server instance as soon as it's possible to take load off the UI server

@SleeplessOne1917
Copy link
Member Author

proxying everything, as we currently are, through the UI server is not a pattern i have seen before and is only nice in Leptos because of SSR and ActionForms.

You are right. Proxying through the UI server is an unnecessary step that will make things needlessly complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants