mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
Merge pull request #1284 from plievone/directives-2-commands
[addons] Renamed update() directives to commands
This commit is contained in:
@@ -51,9 +51,9 @@ var newData = React.addons.update(myData, {
|
||||
|
||||
While the syntax takes a little getting used to (though it's inspired by [MongoDB's query language](http://docs.mongodb.org/manual/core/crud-introduction/#query)) there's no redundancy, it's statically analyzable and it's not much more typing than the mutative version.
|
||||
|
||||
The `$`-prefixed keys are called *directives*. The data structure they are "mutating" is called the *target*.
|
||||
The `$`-prefixed keys are called *commands*. The data structure they are "mutating" is called the *target*.
|
||||
|
||||
## Available directives
|
||||
## Available commands
|
||||
|
||||
* `{$push: array}` `push()` all the items in `array` on the target
|
||||
* `{$unshift: array}` `unshift()` all the items in `array` on the target
|
||||
|
||||
Reference in New Issue
Block a user