-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix Maui.Controls.Sample Blazor dynamic root components trimming problem. #6966
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
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.
Where does this "myDynamicRootComponentInitializer" value come from? Is it just app-specific and not used?
|
@mattleibow Yes, it's just an identifier specific to the sample project. For this case, all we care about is that the correct overload of That said, I'm not completely sure what the original reasoning was for annotating this method overload for linker-friendliness, but not this one. If the latter were annotated, we wouldn't have to apply the change in this PR. Offline, we've discussed annotating the Assuming this is in fact a Blazor issue and not a misuse of cc: @SteveSandersonMS @javiercn in case you have any thoughts about this. |
|
@MackinnonBuck Are we missing DynamicDependency on these two overloads? https://github.com/dotnet/aspnetcore/blob/c85baf8db0c72ae8e68643029d514b2e737c9fae/src/Components/Web/src/JSComponents/JSComponentConfigurationExtensions.cs#L25-L35 |
|
@javiercn - I have a PR to fix the underlying issue in ASP.NET with dotnet/aspnetcore#41610. |
|
@eerhardt so no more concerns with this PR then ? Can we merge this ? |
|
Closing because dotnet/aspnetcore#41610 should fix the issue without requiring this change. |
Description of Change
Updated the
Maui.Controls.Sampleproject to use the correctJSComponentConfigurationExtensions.RegisterForJavaScript()overload that permits adding root components via JavaScript in a linker-friendly manner.Issues Fixed
Fixes #6965