docs: Fix a few typos (#1103)

This commit is contained in:
Tim Gates 2022-12-28 12:15:48 +11:00 committed by GitHub
parent 8fffd71fbd
commit 0be594c713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -131,7 +131,7 @@ The [classes](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attribute
#### `style:`
The [inline CSS styles](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/style) to use with the VNode. The `style` prop can be an object of [CSS properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference) where the keys are the CSS property names and the values are the correpsonding CSS property values. Hyphenated CSS property names can either be in camelCase or quoted to abide by JavaScript syntax restrictions.
The [inline CSS styles](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/style) to use with the VNode. The `style` prop can be an object of [CSS properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference) where the keys are the CSS property names and the values are the corresponding CSS property values. Hyphenated CSS property names can either be in camelCase or quoted to abide by JavaScript syntax restrictions.
```js
h(

View File

@ -48,7 +48,7 @@ The primary [view](views.md) of your app, as set by the [`view:`](../api/app.md#
### Serializability
While you can put anything you want in the state we recommend avoiding things that are unserializable such as symbols, functions, and recursive references. This helps to ensure compatibility with things like saving to peristent local storage, or using other tools especially ones that are potentially Hyperapp-specific.
While you can put anything you want in the state we recommend avoiding things that are unserializable such as symbols, functions, and recursive references. This helps to ensure compatibility with things like saving to persistent local storage, or using other tools especially ones that are potentially Hyperapp-specific.
### State Type

View File

@ -186,7 +186,7 @@ const listenToEvent = (dispatch, { action, type }) => {
The reason is because destructuring the `props` parameter will create local copies of the props listed. This means the cleanup function's closure will be referring to the `action` function that existed at the moment the cleanup function was created and returned, not the moment the cleanup function gets invoked. This is a subtle yet significant difference depending on how you use your actions with this type of subscriber.
The scenario in which this comes into play is if you use an anonymous function for the `action`. An example of where you may consider doing this is if you wanted a way to seletively prevent default event behavior when a subscriber responds to an event.
The scenario in which this comes into play is if you use an anonymous function for the `action`. An example of where you may consider doing this is if you wanted a way to selectively prevent default event behavior when a subscriber responds to an event.
```js
// ./fx.js

View File

@ -200,6 +200,6 @@ For an example, look at the documentation for [`memo()`](../api/memo.md#example)
Memoization exists to help improve rendering performance but it's not a panacea. If it was used with nodes that need to update on every state change, the cost of checking if the memoization's props had changed before carrying out the rendering would be a net loss of performance over time.
Memoization was designed for nodes that don't need to update at all or just occassionally.
Memoization was designed for nodes that don't need to update at all or just occasionally.
As always when it comes to optimizations, be sure to measure the performance of your app to make sure you're getting true benefits and adjust if necessary.

View File

@ -16,7 +16,7 @@
- [Subscriptions](architecture/subscriptions.md) dispatch actions in response to external events.
- [Dispatch](architecture/dispatch.md) controls action dispatching.
    [Flowchart](architecture/flowchart.md) showing the genral flow of a hyperapp app.
    [Flowchart](architecture/flowchart.md) showing the general flow of a hyperapp app.
<h2 title="“Id like to think of browsing the glossary as flipping pages in a book. I can go anywhere instantly and learn whatever suits my fancy.” ―@icylace">Glossary</h2>