@@ -70,7 +70,7 @@ merge an HTML fragment from a GET request.
7070let handleIndex : HttpHandler =
7171 let html =
7272 Elem.html [] [
73- Elem.head [] [ Ds.script ]
73+ Elem.head [] [ Ds.cdnScript ]
7474 Elem.body [] [
7575 Text.h1 "Example: Hello World"
7676 Elem.button
@@ -138,8 +138,8 @@ and will merge the signals with the existing signals.
138138
139139``` fsharp
140140type MySignals() =
141- member var firstName = "Don" with get, set
142- member var lastName = "Syme" with get, set
141+ member val firstName = "Don" with get, set
142+ member val lastName = "Syme" with get, set
143143
144144let signals = MySignals()
145145
@@ -159,7 +159,7 @@ Elem.div [ Ds.signal (sp"signalPath", "signalValue", ifMissing = true) ] []
159159Creates a read-only signal that is computed based on a [ Datastar expression] ( https://data-star.dev/guide/datastar_expressions ) . [ ` data-text ` ] ( #dstext--data-text ) is used here to bind and display the signal value.
160160
161161``` fsharp
162- Elem.div [ Ds.computed "foo" "$bar + $baz" ] []
162+ Elem.div [ Ds.computed ( "foo", "$bar + $baz") ] []
163163Elem.div [ Ds.text "$foo" ] []
164164```
165165
@@ -180,9 +180,9 @@ As an example, the signal can be used to show a loading indicator.
180180
181181``` fsharp
182182Elem.button [
183- Ds.onClick (Ds.get "/fetchBigData") // make a request to the backend
183+ Ds.onClick (Ds.get "/fetchBigData") // make a request to the backend, making fetch happen
184184 Ds.indicator "fetching" // the signal we are creating
185- Ds.attr' "disabled" "$fetching" // assigns the "disabled" attribute if the `fetching` signal value is true
185+ Ds.attr' ( "disabled", "$fetching") // assigns the "disabled" attribute if the `fetching` signal value is true
186186 ] [ Text.raw "Fetch!" ]
187187
188188Elem.div
@@ -223,7 +223,7 @@ Elem.div [ Ds.text "$foo" ] []
223223Binds the value of an HTML attribute to an expression.
224224
225225``` fsharp
226- Elem.div [ Ds.attr' "title" "$foo" ] []
226+ Elem.div [ Ds.attr' ( "title", "$foo") ] []
227227```
228228
229229### [ Ds.show : ` data-show ` ] ( https://data-star.dev/reference/attribute_plugins#data-show )
0 commit comments