Skip to content

Commit 9483417

Browse files
committed
Add replaceStores to api docs
1 parent 823e732 commit 9483417

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/src/docs/07-api.md

+13
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,19 @@ reactor.registerStores({
172172
})
173173
```
174174
175+
#### `Reactor#replacStores(stores)`
176+
177+
`stores` - an object of storeId => store instance
178+
179+
Replace the implementation only of specified stores without resetting to their initial state. This is useful when doing store hot reloading.
180+
181+
```javascript
182+
reactor.replaceStores({
183+
'threads': require('./stores/thread-store'),
184+
'currentThreadID': require('./stores/current-thread-id-store'),
185+
})
186+
```
187+
175188
#### `Reactor#reset()`
176189
177190
Causes all stores to be reset to their initial state. Extremely useful for testing, just put a `reactor.reset()` call in your `afterEach` blocks.

0 commit comments

Comments
 (0)