Skip to content

Commit

Permalink
Fix issue with outdated comment. (#4192)
Browse files Browse the repository at this point in the history
  • Loading branch information
timodwhit authored Nov 4, 2022
1 parent 0a97da3 commit dfcff87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/src/docs/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,9 @@ uppy.setState({
State in Uppy is considered to be immutable. When updating values, make sure not mutate them, but instead create copies. See [Redux docs](http://redux.js.org/docs/recipes/UsingObjectSpreadOperator.html) for more info on this. Here is an example that updates progress for a particular file in state:

```js
// We use Object.assign({}, obj) to create a copy of `obj`.
// We use the spread operator to create a copy of the files object.
const updatedFiles = { ...uppy.getState().files }
// We use Object.assign({}, obj, update) to create an altered copy of `obj`.
// We use the spread operator to create a copy of the files object.
const updatedFile = {
...updatedFiles[fileID],
progress: {
Expand Down

0 comments on commit dfcff87

Please sign in to comment.