Skip to content

Commit

Permalink
Directly return useSnackbar context [#223]
Browse files Browse the repository at this point in the history
  • Loading branch information
iamhosseindhv committed Mar 5, 2020
1 parent 74702ed commit a1a6593
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/useSnackbar.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import { useContext } from 'react';
import SnackbarContext from './SnackbarContext';

export default () => {
const { enqueueSnackbar, closeSnackbar } = useContext(SnackbarContext);

return {
enqueueSnackbar,
closeSnackbar,
};
};
export default () => useContext(SnackbarContext);

0 comments on commit a1a6593

Please sign in to comment.