-
-
Notifications
You must be signed in to change notification settings - Fork 691
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
feat: add impl_into
argument to #[server]
proc_macro
#2334
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This warning appears in the browser's console log. ``` hackernews.js:933 At src/routes/stories.rs:39:17, you are reading a resource in `hydrate` mode outside a <Suspense/> or <Transition/>. This can cause hydration mismatch errors and loses out on a significant performance optimization. To fix this issue, you can either: 1. Wrap the place where you read the resource in a <Suspense/> or <Transition/> component, or 2. Switch to using create_local_resource(), which will wait to load the resource until the app is hydrated on the client side. (This will have worse performance in most cases.) ```
…ntegration (leptos-rs#2241) * fix: error rather than panicking if unable to send response in Axum integration
Note that this is a minimal implementation and will __not__ allow the user to `expect_state` if they have external calls to rendering their app (i.e. using `render_app_to_*` directly).
Co-authored-by: SleeplessOne1917 <[email protected]>
This warning is seen in the browsers console window. ``` counter_isomorphic.js:1068 At src/counters.rs:138:17, you are reading a resource in `hydrate` mode outside a <Suspense/> or <Transition/>. This can cause hydration mismatch errors and loses out on a significant performance optimization. To fix this issue, you can either: 1. Wrap the place where you read the resource in a <Suspense/> or <Transition/> component, or 2. Switch to using create_local_resource(), which will wait to load the resource until the app is hydrated on the client side. (This will have worse performance in most cases.) ``` Two derived signals "value" and "error_msg" need to be wrapped in a <Suspense> block. "value" falls back to just the initial text. "error" uses the default fallback.
…va/leptos into server_fn_impl_into_arg
You might need to recreate your PR against the most recent version, you're pulling in a lot of old/extra PRs |
Ok, will do that then, thank you! |
PR without old/extra PRs is now here: #2335 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an optional
impl_into
named argument forserver_fn
proc macro.This argument defaults to
true
and enables (or disables) the impl ofFrom
trait for server function argument type.In cases when the server function has more than one argument, the
impl_into
has no effect on the trait impl generation, as it has been already disabled by function arguments number check.The related issue has been discussed here: https://discord.com/channels/1031524867910148188/1203001939089035295
TL;DR: orphan rules disable (in some cases) the implementation of
From
trait for conversion between the only server function argument and server function argument type.The minimal example of the issue lives here: https://github.com/videobitva/test_server_fn