-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Add [RenderModeStatic] attribute #51102
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
Comments
Thanks for contacting us. |
Hi @MCGPPeters. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@mkArtakMSFT Thanks for your quick reply. A realistic example would be something more general than a specific case. As I understand it, and I could be wrong of course, the point of static rendering is reduced resource utilization. In one of the ASP.NET community standups (September 12th) it was advised to only use interactivity when needed for this reason, which makes sense to me. So if it were possible to mix and match interactive with static components on the same page, wouldn't that reduce resource utilization? Tnx! |
@MCGPPeters So you think that if you were able to mark a child component within an interactive hierarchy as static, then it would use less resources as it would not have interactivity attached to it? I understand that reasoning. But then we have the problem of someone putting an interactive component in that component. That would not work. It would also be confusing to a lot of devs. Is there any possible needs for this complexity - other than reducing resources used? |
This seems to be a similar to #51046. |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
When I set a RenderMode attribute on the root component (or any parent component for that matter), all child components will inherit that render mode. If I want to make one of those child components to have a static render mode, I am not able to express that. For other render modes, an attribute does exist.
Describe the solution you'd like
Add [RenderModeStatic] attribute so I can express a specific component should be statically rendered on the server side, even if a parent component has an interactive render mode.
Additional context
No response
The text was updated successfully, but these errors were encountered: