@@ -573,6 +573,7 @@ turbo_boost.state[:key]
573573
574574``` erb
575575<%
576+ # view
576577 turbo_boost.state[:key] = "value"
577578 turbo_boost.state[:key]
578579 #=> "value"
@@ -605,6 +606,7 @@ turbo_boost.state.now[:key]
605606
606607``` erb
607608<%
609+ # view
608610 turbo_boost.state.now[:key] = "value"
609611 turbo_boost.state.now[:key]
610612 #=> "value"
@@ -616,7 +618,7 @@ turbo_boost.state.now[:key]
616618Client-State is a mutable version of the signed Server-State, wrapped in an observable JavaScript proxy.
617619This allows for sophisticated techniques like data binding via custom JavaScript, Stimulus controllers, or web components.
618620
619- Client-side state enables immediate UI updates, providing a fast and smooth user experience while the server
621+ Client-State enables immediate UI updates, providing a fast and smooth user experience while the server
620622[ resolves state] ( #state-resolution ) differences whenever Commands are invoked.
621623
622624Client-State can be accessed on the client like so.
@@ -630,7 +632,7 @@ TurboBoost.State.current['key']
630632### Page-State
631633
632634Page-State is managed by the client and used to remember element attribute values between server renders.
633- It’s best for tracking transient user interactions, like which elements are visible, open/closed, their position, etc.
635+ It’s best for tracking transient user interactions, such as - which elements are visible, open/closed, their position, etc.
634636
635637This enhances the user experience by maintaining the state of UI elements between renders.
636638When invoking commands, the client sends the Page-State to the server, allowing it to preserve element attributes when rendering.
@@ -645,13 +647,13 @@ You can opt-in to remember Page-State with Rails tag helpers via the `turbo_boos
645647<% end %>
646648```
647649
648- _ This remembers whether the ` details ` element is open or closed._
650+ This will remember whether the ` details ` element is open or closed.
649651
650652__ That's it!__ You're done.
651653
652654> [ !NOTE]
653- > Page-State tracking works with all element attributes, including ` aria ` and ` data ` ,
654- > but elements must have a unique ` id ` to participate in Page-State tracking.
655+ > Page-State tracking works with all element attributes, including ` aria ` , ` data ` , and even custom attributes.
656+ > Elements must have a unique ` id ` to participate in Page-State tracking.
655657
656658### State Resolution
657659
0 commit comments