Skip to content

Commit

Permalink
fix: make getDerivedStateFromProps's nextProps param Readonly (#647)
Browse files Browse the repository at this point in the history
Fixes #381.
  • Loading branch information
simon-abbott committed Mar 1, 2022
1 parent 713bd1f commit c737e7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modal.tsx
Expand Up @@ -232,7 +232,7 @@ export class ReactNativeModal extends React.Component<ModalProps, State> {
}
}

static getDerivedStateFromProps(nextProps: ModalProps, state: State) {
static getDerivedStateFromProps(nextProps: Readonly<ModalProps>, state: State) {
if (!state.isVisible && nextProps.isVisible) {
return {isVisible: true, showContent: true};
}
Expand Down

0 comments on commit c737e7f

Please sign in to comment.