mirror of
https://github.com/transloadit/uppy.git
synced 2026-01-23 02:25:07 +00:00
docs: document redux store wart
This commit is contained in:
parent
afd30a43b8
commit
9948a841b7
1 changed files with 3 additions and 0 deletions
|
|
@ -94,11 +94,14 @@ If you'd rather not store the Uppy state under the `state.uppy` key at all, use
|
|||
const uppy = Uppy({
|
||||
store: ReduxStore({
|
||||
store: store,
|
||||
id: 'avatarUpload',
|
||||
selector: state => state.pages.profile.uppy.avatarUpload
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
Note that when specifying a custom selector, you **must** also specify a custom store ID. The store `id` tells the reducer in which property it should put Uppy's state. The selector must then take the state from that property. In the example, we set the ID to `avatarUpload` and take the state from the `[reducer mount path].avatarUpload`.
|
||||
|
||||
If your app uses [`reselect`](https://npmjs.com/package/reselect), its selectors work very well with this!
|
||||
|
||||
## Implementing Stores
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue