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

[Blazor] Discourage use of DotNet.invokeMethod and DotNet.invokeMethodAsync #48396

Open
MackinnonBuck opened this issue May 23, 2023 · 5 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-full-stack-web-ui Full stack web UI with Blazor Pillar: Complete Blazor Web Priority:2 Work that is important, but not critical for the release

Comments

@MackinnonBuck
Copy link
Member

MackinnonBuck commented May 23, 2023

The DotNet.invokeMethod and DotNet.invokeMethodAsync APIs currently throw when more than one interactive runtime is present. We should be encouraging developers to replace usage of these methods with DotNetObjectReference method invocations so that JS->.NET interop works regardless of which combination of .NET runtimes are available.

We should consider logging a warning during development if we detect usage of DotNet.invokeMethod or DotNet.invokeMethodAsync.

@MackinnonBuck MackinnonBuck added area-blazor Includes: Blazor, Razor Components feature-full-stack-web-ui Full stack web UI with Blazor labels May 23, 2023
@MackinnonBuck MackinnonBuck added this to the .NET 8 Planning milestone May 23, 2023
@ghost
Copy link

ghost commented May 23, 2023

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@MackinnonBuck MackinnonBuck added the enhancement This issue represents an ask for new feature or an enhancement to an existing one label May 23, 2023
@mkArtakMSFT mkArtakMSFT changed the title Follow-ups to improve the experience when using Blazor Server and WebAssembly components together Follow-ups to improve the experience when using Blazor Server and WebAssembly components within the sing app together Jun 5, 2023
@mkArtakMSFT mkArtakMSFT changed the title Follow-ups to improve the experience when using Blazor Server and WebAssembly components within the sing app together Follow-ups to improve the experience when using Blazor Server and WebAssembly components within the single app together Jun 5, 2023
@ghost
Copy link

ghost commented Jun 13, 2023

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT modified the milestones: .NET 8 Planning, Backlog Jun 29, 2023
@ghost
Copy link

ghost commented Jun 29, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@ghd258
Copy link

ghd258 commented Aug 9, 2023

这些什么时候能处理完成

@ghost
Copy link

ghost commented Dec 20, 2023

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT added the Priority:2 Work that is important, but not critical for the release label Jan 17, 2024
@MackinnonBuck MackinnonBuck changed the title Follow-ups to improve the experience when using Blazor Server and WebAssembly components within the single app together [Blazor] Discourage use of DotNet.invokeMethod and DotNet.invokeMethodAsync Jan 17, 2024
@mkArtakMSFT mkArtakMSFT removed this from the .NET 9 Planning milestone Jan 30, 2024
@mkArtakMSFT mkArtakMSFT added this to the .NET 10 Planning milestone Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-full-stack-web-ui Full stack web UI with Blazor Pillar: Complete Blazor Web Priority:2 Work that is important, but not critical for the release
Projects
None yet
Development

No branches or pull requests

5 participants
@SteveSandersonMS @ghd258 @MackinnonBuck @mkArtakMSFT and others