-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
Update transient services guidance #31705
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a question about the guidance for using scoped services with server interactivity.
@guardrex @MackinnonBuck I'd recommend adding one or two sentences explaining why transient disposables are a problem and why it's important to avoid them. |
Already done ... it's in the first (earlier) section on |
@guardrex Not sure if you're referring to this section?
I've discussed this with several colleagues, and despite their current knowledge and after going through this section of the documentation, they're unsure why transient disposables are particularly problematic, mainly because they haven't been following the Blazor issue tracking and haven't had the chance to look into any related issues:
(Just an observation from the field, you might have different view.) |
I'll raise that with Mackinnon on the new PR. |
Ok ... it's live now ... These updates went in yesterday. I guess I agreed with you! 😆 ... because I did make quite an update to the lead-in bits. In spite of this PR being closed, take a look at it now here and let me know if you still have concerns about it. We'll avoid opening yet another issue in a SEA of Blazor issues at the moment 😩. I'm working fast to get the backlog down because we're starting to document .NET 9 NOW 😅. |
It's much clearer now, but it still doesn't explain why specifically transient disposables are problematic. (The introduction mentions transient services in general, which might leave readers questioning why disposable services, in particular, should be identified as an issue.) |
I think the "disposables" part could be dropped. I'll open an issue to discuss this subject further with Mackinnon. |
Fixes #31689
Addresses #28161
Blazor samples were updated on dotnet/blazor-samples#181.
Internal previews