Rename `send` to `action` in docs & examples?
See original GitHub issueSaw a lot of work is going on with v4. Very cool!
Just a thought here – actions
are mentioned a lot as a concept throughout the documentation, but don’t exist as a word anywhere in the examples. What if we renamed send
to action
, since that’s what it’s doing? e.g.
const mainView = (state, prev, action) => html`
<main>
<h1>Title: ${state.title}</h1>
<input
type="text"
oninput=${(e) => action('update', e.target.value)}>
</main>
`
This might help clarify concepts and bring the ideas from the unidirectional architecture chart into the code – making it easier for beginners to understand and pick up. Since send
is always referenced as a parameter it would not change the API at all, just the examples, and I think it would solidify the relationship between concepts and code considerably with one small tweak.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Edit documents with a screen reader - Google Docs Editors Help
Take quick actions by searching the menus · Press Alt + / (Windows, Chrome OS) or Option + / (Mac). · Type a...
Read more >Copy, rename, and move objects | Cloud Storage
Navigate to the object, which may be located in a folder. Click the more actions menu ( ) associated with the object. Click...
Read more >Method: resources.features.rename | Admin console
Parameters. customer. string. The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the my_customer alias ......
Read more >Using Rename action for file
Use the Rename action to rename a file. This action enables you to rename a file based on its size and the date...
Read more >Move/Rename file actions - Dropbox - Workato Docs
This action allows you to move or rename the existing files in your Dropbox instance. To rename a file/folder, change the file/folder name...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@timwis that would break the unidirectional model, and would require the extra
done()
callback in the views. I think creating a clear boundry between views and logic so far has paid off, I’d be cautious to mess with thatIn this case maybe updating the docs with “An action can trigger either an effect or a reducer.”?