Skip to content

Commit 02334d0

Browse files
committed
Clarify storeName type in context, writing functions
to close #406
1 parent 952b91d commit 02334d0

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

docs/user-guide/writing-functions.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,18 +378,19 @@ to use.
378378

379379
{% highlight javascript %}
380380
// Get value - sync
381-
var myCount = flow.get("count", storeName);
381+
var myCount = flow.get("count", "storeName");
382382

383383
// Get value - async
384-
flow.get("count", storeName, function(err, myCount) { ... });
384+
flow.get("count", "storeName", function(err, myCount) { ... });
385385

386386
// Set value - sync
387-
flow.set("count", 123, storeName);
387+
flow.set("count", 123, "storeName");
388388

389389
// Set value - async
390-
flow.set("count", 123, storeName, function(err) { ... })
390+
flow.set("count", 123, "storeName", function(err) { ... })
391391
{% endhighlight %}
392392

393+
Note: In the examples above "storeName" can be a variable if required.
393394

394395
#### Global context
395396

0 commit comments

Comments
 (0)