Skip to content

Commit 806d9f6

Browse files
committed
reword "for example" phrases
1 parent f825f98 commit 806d9f6

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

docs/source/adding-interactivity/dangers-of-mutability/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ What is a Mutation?
1515
In Python, values may be either "mutable" or "immutable". Mutable objects are those
1616
whose underlying data can be changed after they are created, and immutable objects are
1717
those which cannot. A "mutation" then, is the act of changing the underlying data of a
18-
mutable value. For example, a :class:`dict` is a mutable type of value. In the code
18+
mutable value. In particular, a :class:`dict` is a mutable type of value. In the code
1919
below, an initially empty dictionary is created. Then, a key and value is added to it:
2020

2121
.. code-block::

docs/source/adding-interactivity/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ which owns the state.
124124
125125
This behavior of IDOM means that each render of a component is like taking a snapshot of
126126
the UI based on the component's state at that time. Treating state in this way can help
127-
reduce subtle bugs. For example, in the code below there's a simple chat app with a
127+
reduce subtle bugs. For instance, in the code below there's a simple chat app with a
128128
message input and recipient selector. The catch is that the message actually gets sent 5
129129
seconds after the "Send" button is clicked. So what would happen if we changed the
130130
recipient between the time the "Send" button was clicked and the moment the message is

docs/source/adding-interactivity/multiple-state-updates/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ handlers have finished running.
4141

4242
This behavior of IDOM to "batch" state changes that take place inside a single event
4343
handler, do not extend across event handlers. In other words, distinct events will
44-
always produce distinct renders. For example, if clicking a button increments a counter
45-
by one, no matter how fast the user clicks, the view will never jump from 1 to 3 - it
46-
will always display 1, then 2, and then 3.
44+
always produce distinct renders. To give an example, if clicking a button increments a
45+
counter by one, no matter how fast the user clicks, the view will never jump from 1 to 3
46+
- it will always display 1, then 2, and then 3.
4747

4848

4949
Incremental Updates

docs/source/adding-interactivity/state-as-a-snapshot/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ State as a Snapshot
33

44
When you watch the user interfaces you build change as you interact with them, it's easy
55
to imagining that they do so because there's some bit of code that modifies the relevant
6-
parts of the view directly. For example, you may think that when a user clicks a "Send"
7-
button, there's code which reaches into the view and adds some text saying "Message
8-
sent!":
6+
parts of the view directly. As an illustration, you may think that when a user clicks a
7+
"Send" button, there's code which reaches into the view and adds some text saying
8+
"Message sent!":
99

1010
.. image:: _static/direct-state-change.png
1111

docs/source/creating-interfaces/html-with-idom.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ what the HTML would look like if displayed:
5252

5353
What this shows is that you can recreate the same HTML layouts with IDOM using functions
5454
from the :mod:`idom.html` module. These function share the same names as their
55-
corresponding HTML tags. For example, the ``<h1/>`` element above has a similarly named
55+
corresponding HTML tags. For instance, the ``<h1/>`` element above has a similarly named
5656
:func:`~idom.html.h1` function. With that said, while the code above looks similar, it's
5757
not very useful because we haven't captured the results from these function calls in a
5858
variable. To do this we need to wrap up the layout above into a single

docs/source/creating-interfaces/rendering-data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ to work with data that already exists. In those cases, how should we pick what v
277277
use for each ``key``?
278278

279279
- If your data comes from your database you should use the keys and IDs generated by
280-
that database since these are inherently unique. For example, you might user the
280+
that database since these are inherently unique. For example, you might use the
281281
primary key of records in a relational database.
282282

283283
- If your data is generated and persisted locally (e.g. notes in a note-taking app), use

docs/source/getting-started/running-idom.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ Specific Server Settings
173173
The ``Config`` :ref:`described above <Common Server Settings>` is meant to be an
174174
implementation agnostic - all ``Config`` objects support a similar set of options.
175175
However, there are inevitably cases where you need to set up your chosen server using
176-
implementation specific details. For example, you might want to add an extra route to
176+
implementation specific details. For instance, you might want to add an extra route to
177177
the server your using in order to provide extra resources to your application.
178178

179179
Doing this kind of set up can be achieved by passing in an instance of your chosen
180-
server implementation into the ``app`` parameter of the ``run()`` function. For example,
181-
if I'm making my application with ``sanic`` and I want to add an extra route I would
182-
do the following:
180+
server implementation into the ``app`` parameter of the ``run()`` function. To
181+
illustrate, if I'm making my application with ``sanic`` and I want to add an extra route
182+
I would do the following:
183183

184184
.. code-block::
185185

0 commit comments

Comments
 (0)