Skip to content
Discussion options

You must be logged in to vote

@oltodo

The root cause is from line 72 where form data is persisted in Redux store, it will transform the object to immutable object but this object is used by react-hook-form to get and set value on ref.

Cloning form data before persisting it to Redux store will fix the issue.

Working sample: https://codesandbox.io/s/react-hook-form-cannot-assign-to-read-only-property-forked-nqkk7

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bluebill1049
Comment options

@oltodo
Comment options

Answer selected by oltodo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants