You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📦 Manually adding JS code is no longer necessary - all required JS code now comes included with the package.
🐛 Fixed a race condition on page initialization leading to the page sometimes failing to initialize.
⌚ Fixed descendant components continuing to wait for the state root (page) to initialize after it has failed to initialize.
📖 Removed step 5 (`Include the necessary JS code`) from 'Getting Started' documentation page.
📖 Minor updates to the sample app.
Copy file name to clipboardexpand all lines: docs/src/02.getting-started.md
+1-14
Original file line number
Diff line number
Diff line change
@@ -64,20 +64,7 @@ Any page containing persistent components, must also be stateful. This is a requ
64
64
65
65
To learn more about page state hierarchy, refer to the [State Hierarchy](03.state-hierarchy.md) section.
66
66
67
-
#### 5. Include the necessary JS code
68
-
69
-
> ⚠️
70
-
> This is a temporary step until a better solution is implemented. We expect this step to go away in one of the future releases.
71
-
72
-
Include [this](https://github.com/BitzArt/Blazor.State/blob/main/sample/BitzArt.Blazor.State.SampleApp/BitzArt.Blazor.State.SampleApp.Client/wwwroot/app.js) JS file in your **Client** project's `wwwroot` folder.
73
-
74
-
Then, also include the following line in your `App.razor`:
75
-
76
-
```html
77
-
<scriptsrc="app.js"></script>
78
-
```
79
-
80
-
#### 6. Enjoy
67
+
#### 5. Enjoy
81
68
82
69
That's it! Your components' state should now be persisted across rendering environments.
if(rootStrategyis not PersistentPageRenderStrategypageStrategy)
67
-
thrownewInvalidOperationException("The root stateful component is not a page. Make sure your page inherits from PersistentComponentBase.");
83
+
thrownewInvalidOperationException("The root stateful component is not a page. Make sure your pages containing persistent components also inherit from PersistentComponentBase.");
.LogWarning("State container was not found on page. Initializing state as a fallback. Ignore this warning if prerendering is disabled for this page.");
0 commit comments