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

Add clarification on interactive root component remark #31543

Closed
1 task done
DavidThielen opened this issue Jan 21, 2024 · 4 comments · Fixed by #31544
Closed
1 task done

Add clarification on interactive root component remark #31543

DavidThielen opened this issue Jan 21, 2024 · 4 comments · Fixed by #31544
Assignees
Labels

Comments

@DavidThielen
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

In the documentation discussing disabling pre-rendering it says:

Making a root component interactive, such as the App component, isn't supported. Therefore, prerendering can't be disabled directly by the App component.

It then goes on to say:

For apps based on the Blazor Web App project template, a render mode assigned to the entire app is specified where the Routes component is used in the App component (Components/App.razor). The following example sets the app's render mode to Interactive Server with prerendering disabled:

So it says you can't set this in App.razor. Then tells you to turn it off globally, set it to false in App.razor. This needs to say one or the other as both cannot be correct at the same time.

Expected Behavior

It should state that either prerendering can not be set in App.razor and it then shows an example of how to then set it in every top level component.

Or it should state that it can be set in App.razor and then keep the existing example.

Steps To Reproduce

Read the documentation

Exceptions (if any)

No response

.NET Version

8

Anything else?

No response

@javiercn
Copy link
Member

@DavidThielen thanks for contacting us.

I think the confusion comes here from the fact that you can't make the App component itself interactive, but for disabling interactivity globally, the way it's done is by setting the value at the callsite of the Routes component inside the App component.

@javiercn
Copy link
Member

@guardrex feel free to update the docs if you feel we need to be more explicit here.

@javiercn javiercn transferred this issue from dotnet/aspnetcore Jan 22, 2024
@guardrex guardrex self-assigned this Jan 22, 2024
@guardrex guardrex added Pri1 High priority, do before Pri2 and Pri3 doc-enhancement 8.0 .NET 8 labels Jan 22, 2024
@dotnet dotnet deleted a comment from github-actions bot Jan 22, 2024
@guardrex guardrex changed the title Documentation conflict - Add clarification on interactive root component remark Jan 22, 2024
@DavidThielen
Copy link
Author

@javiercn That makes sense.

@guardrex I think adding javiercn's sentence to the documentation would resolve this issue.

thanks - dave

@guardrex
Copy link
Collaborator

It's already resolved, and the update will probably go live by EOD. Thanks for the feedback on that point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants