Skip to content

Commit

Permalink
feat(@uform/core): remove immer dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Apr 26, 2019
1 parent 5d6da37 commit d9523eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"@uform/utils": "0.1.1",
"@uform/validator": "0.1.1",
"dot-match": "^0.1.18",
"immer": "^1.7.4",
"rxjs": "^6.3.3",
"scheduler": "^0.11.2"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { runValidation, format } from '@uform/validator'
import { Subject } from 'rxjs'
import { filter } from 'rxjs/operators'
import { FormPath } from './path'
import produce from 'immer'

const defaults = opts => ({
initialValues: {},
Expand Down Expand Up @@ -168,7 +167,8 @@ export class Form {
setFormState = reducer => {
if (!isFn(reducer)) return
return new Promise(resolve => {
const published = produce(this.publishState(), reducer)
const published = this.publishState()
reducer(published, reducer)
this.checkState(published)
resolve()
})
Expand Down

0 comments on commit d9523eb

Please sign in to comment.