Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,20 @@ Given a Web Worker instance, sets up RPC-based synchronization with a WorkerStor
```javascript
import createStore from 'stockroom'
import StoreWorker from 'worker-loader!./store.worker'
let store = createStore(new StoreWorker)
let store = createStore(new StoreWorker())
```

Returns **Store** synchronizedStore - a mock unistore store instance sitting in front of the worker store.

#### module:stockroom/inline

Used to run your whole store on the main thread.
Useful non-worker environments or as a fallback.
Useful for non-worker environments or as a fallback.

##### createInlineStore

For SSR/prerendering, pass your exported worker store through this enhancer
to make an inline synchronous version that runs in the same thread.
to make an inline synchronous version that runs in the same thread.

**Parameters**

Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ let stockroom; // eslint-disable-line

/** Given a Web Worker instance, sets up RPC-based synchronization with a WorkerStore running within it.
* @memberof module:stockroom
* @param {Worker} worker An instantiated Web Worker (eg: `new Worker('./store.worker.js')`)
* @returns {Store} synchronizedStore - a mock unistore store instance sitting in front of the worker store.
* @param {Worker} worker An instantiated Web Worker (eg: `new Worker('./store.worker.js')`)
* @returns {Store} synchronizedStore - a mock unistore store instance sitting in front of the worker store.
* @example
* import createStore from 'stockroom'
* import StoreWorker from 'worker-loader!./store.worker'
* let store = createStore(new StoreWorker)
* let store = createStore(new StoreWorker())
*/
export default function createStore(worker) {
let listeners = [],
Expand Down
10 changes: 5 additions & 5 deletions src/inline.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/** Used to run your whole store on the main thread.
* Useful non-worker environments or as a fallback.
* Useful for non-worker environments or as a fallback.
* @name module:stockroom/inline
*/
let inline; // eslint-disable-line

/** For SSR/prerendering, pass your exported worker store through this enhancer
* to make an inline synchronous version that runs in the same thread.
* to make an inline synchronous version that runs in the same thread.
* @memberof module:stockroom/inline
* @param {WorkerStore} workerStore The exported `store` instance that would have been invoked in a Worker
* @returns {Store} inlineStore - a unistore instance with centralized actions
* @param {WorkerStore} workerStore The exported `store` instance that would have been invoked in a Worker
* @returns {Store} inlineStore - a unistore instance with centralized actions
* @example
* let store
* if (SUPPORTS_WEB_WORKERS) {
* if (SUPPORTS_WEB_WORKERS === false) {
* let createStore = require('stockroom/inline')
* store = createStore(require('./store.worker'))
* }
Expand Down