Description
When creating a class library, the _Imports.razor is not necessarily there.
Therefore, also the @using Microsoft.AspNetCore.Components.Web will not be there.
Thus when copying working code over to that new class library, places where @onclick was used will stop working without any compiler or runtime warning or error.
The documentation says nothing about this either, so it is very cumbersome to debug, hence the suggestion to improve the docs.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
Description
When creating a class library, the
_Imports.razoris not necessarily there.Therefore, also the
@using Microsoft.AspNetCore.Components.Webwill not be there.Thus when copying working code over to that new class library, places where
@onclickwas used will stop working without any compiler or runtime warning or error.The documentation says nothing about this either, so it is very cumbersome to debug, hence the suggestion to improve the docs.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.