Skip to content

Commit 9a1bec1

Browse files
committed
improve demo docs
1 parent da5f84f commit 9a1bec1

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

example/start-csr/src/pages/intro.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ pub fn Introduction() -> impl IntoView {
1212
">
1313
<h1>Why Leptos Query?</h1>
1414
<hr></hr>
15-
<strong>What is a Query? What is async state?</strong>
16-
<p>Broadly, a Query is an async request for data, bound to a unique key. You often (but not always) "don't" own that state on the client.
17-
</p>
15+
<p> Leptos Query manages and simplifies async state for you on the client (through the use of Queries)</p>
16+
<strong> What is a Query? What is Async State?</strong>
17+
<p>A Query is an async request for data, bound to a unique key.</p>
1818
<p>
19-
"We'll" call this state <code>Async State</code>.
19+
"We'll" call this data <code>Async State</code>.
2020
Here are some common properties:
2121
</p>
2222
<ul>
2323
<li>You do not control or own the "source of truth" on the client</li>
2424
<li>Requires async APIs for fetching data</li>
2525
<li>
26-
Implies shared ownership and can be changed by other people without your knowledge
26+
Possible shared ownership and can be changed by others without your knowledge
2727
</li>
2828
<li>
2929
Can potentially become "out of date" in your apps if "you're" not careful
@@ -32,10 +32,10 @@ pub fn Introduction() -> impl IntoView {
3232
<p>
3333
Very often in programming highly dynamic web apps, you end up creating a client-side state machine to keep some
3434
<code>Async State</code>
35-
in sync with the actual source of truth (usually the server/database or the browser).
35+
in sync with the actual source of truth (usually a server/database).
3636
</p>
3737
<p>
38-
This helps make your app "feel" more responsive, with instant updates and the like.
38+
This helps make your app "feel" more responsive, providing instant updates and the like.
3939
</p>
4040
<h4> But there are issues... </h4>
4141
<ul>
@@ -59,18 +59,16 @@ pub fn Introduction() -> impl IntoView {
5959
<li>Updates (set to new value, update mut existing value, etc.)</li>
6060
<li>Client side persistence (local storage, indexed db, etc.)</li>
6161
</ul>
62-
<p>"Here's" where a Leptos Query comes in.</p>
63-
<h2>Leptos Query to the rescue</h2>
62+
<h2>"Here's" where a Leptos Query comes in.</h2>
6463
<hr></hr>
6564
<p>
66-
Leptos Query is a client-side Query Manager, helping you manage
67-
<code>Async State</code> for highly dynamic and interactive Leptos web apps, which handles all of the above problems.
65+
Leptos Query helps you manage <code>Async State</code> for highly dynamic and interactive Leptos web apps, which handles all of the above problems (and more!).
6866
</p>
6967
Practically speaking, by using Leptos Query, you will likely:
7068
<ul>
7169
<li>Reduce your code complexity and improve code maintainability by removing a lot of state management from your client side code</li>
72-
<li>Improve the user experience by improving the speed and responsiveness of your app</li>
73-
<li>Have a nicer debugging experience, with the provided Devtools</li>
70+
<li>Improve the user experience by (1) improving the speed and responsiveness of your app, and (2) ensuring that data is always up to date</li>
71+
<li>Have a nicer debugging experience with the provided Devtools</li>
7472
</ul>
7573
</article>
7674
}

0 commit comments

Comments
 (0)