Skip to content

Commit

Permalink
[alpha] Add .bind(this) to method stored in provider state (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyraymond authored Aug 21, 2021
1 parent dfde5ca commit 4d8be86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SnackbarProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class SnackbarProvider extends Component<SnackbarProviderProps, State> {
snacks: [],
queue: [], // eslint-disable-line react/no-unused-state
contextValue: {
enqueueSnackbar: this.enqueueSnackbar,
closeSnackbar: this.closeSnackbar,
enqueueSnackbar: this.enqueueSnackbar.bind(this),
closeSnackbar: this.closeSnackbar.bind(this),
},
};
}
Expand Down

0 comments on commit 4d8be86

Please sign in to comment.