Skip to content

Commit 70d9e74

Browse files
authored
Fix persistent state API bug (#36129)
1 parent 1f6c84e commit 70d9e74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aspnetcore/blazor/state-management/prerendered-state-persistence.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ public class CounterService
168168
In `Program.cs`:
169169

170170
```csharp
171-
builder.Services.RegisterPersistentService<CounterService>(
172-
RenderMode.InteractiveAuto);
171+
builder.Services.AddRazorComponents()
172+
.RegisterPersistentService<CounterService>(RenderMode.InteractiveAuto);
173173
```
174174

175175
Serialized properties are identified from the actual service instance:

0 commit comments

Comments
 (0)