MackinnonBuck/blazor-page-script

is this project the same as the component in the FluentUI Blazor?

billqian opened this issue · 2 comments

as titled

Yes, looks like it!

The idea behind the code in the docs was that it's small enough to be copied/pasted/modified to a project's needs. It seems that the fluentui-blazor project added PageScript because it was useful when making its own functionality work with enhanced navigation. The component was probably added for internal implementation reasons, so it might have been an accident that consumers of that library can also use the component. Generally, it's probably better for libraries to either:

  • Not define the component and instead render the <page-script> custom element directly, or...
  • Make the component internal

The possible exception might be this repo/library, whose purpose is to:

  • Make it easier to consume this functionality as a NuGet package
  • Have discussions, post questions, propose changes
  • Extend the feature with more functionality than what would be appropriate for a docs example

The ultimate goal is to collect enough information about how the community uses this feature to add it directly into Blazor (assuming there's enough demand for that). With this in mind, it's ideal that libraries merely using PageScript as an implementation detail don't expose it publicly, since this would make removing that component in the future a breaking change for consumers of that library.

Got it, a lot of thanks for your reply.