Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@untra/naiveasync",
"version": "0.6.4",
"version": "0.6.6",
"description": "An Opinionated and Painless React & Redux promise wrapper",
"main": "./dist/src/naiveasync/index.js",
"types": "./dist/src/naiveasync/index.d.ts",
Expand All @@ -12,7 +12,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/stackhawk/naiveasync.git"
"url": "git+https://github.com/untra/naiveasync.git"
},
"homepage": "https://naiveasync.untra.io/",
"jest": {
Expand All @@ -26,7 +26,6 @@
"scripts": {
"postversion": "git push && git push --tags",
"prepublishOnly": "npm run ci && npm run defs",
"postpublish": "npm run deploy",
"preversion": "npm run ci",
"test": "npm run build && jest",
"build": "rm -rf dist && mkdir dist && cp src/index.html dist/index.html && tsc -p build.tsconfig.json && npm run defs",
Expand Down
22 changes: 12 additions & 10 deletions src/routes/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,19 @@ const asyncOperation = (params: ParamsValue): Promise<DataValue> =>
lifecycle to your redux store. The difference is subtle:
<ul>
<li>
use <b>.call()</b> to call the promise and reset the state of the lifecycle
immediately. Good for when you want the current data invalidated ASAP before any
data is returned. For example:
use <b>.call()</b> to call the promise and reset the state of
the lifecycle immediately. Good for when you want the current
data invalidated ASAP before any data is returned. For example:
<i>
create, update, delete operations, tests and dynamic
operations.
</i>
</li>
<li>
use <b>.sync()</b> to call the promise but retain the existing state of the
lifecycle until data is returned. Note that as a convenience, subsequent `sync`
invocations without parameters will reuse the last specified parameters. Good for:
use <b>.sync()</b> to call the promise but retain the existing
state of the lifecycle until data is returned. Note that as a
convenience, subsequent `sync` invocations without parameters
will reuse the last specified parameters. Good for:
<i>
get, indexes, subscriptions, and searches, idempotent
operations
Expand Down Expand Up @@ -263,17 +264,18 @@ const asyncOperation = (params: ParamsValue): Promise<DataValue> =>
</code>{" "}
Action creator that triggers the associated{" "}
<code>AsyncOperation</code> when dispatched, passing{" "}
<code>params</code> into the operation. Resets its state immediately
when called.
<code>params</code> into the operation. Resets its state
immediately when called.
</li>
<li>
<code>
<strong>.sync({})</strong>
</code>{" "}
Action creator that triggers the associated `AsyncOperation`
when dispatched, reusing the last employed params if none are
provided. Does not reset data or error states until data is returned,
making it useful for polling / repeated "read/get" operations.
provided. Does not reset data or error states until data is
returned, making it useful for polling / repeated "read/get"
operations.
</li>
<li>
<code>
Expand Down