Skip to content

Commit

Permalink
Fix typo in migration guide (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
gokseloz authored Jan 18, 2025
1 parent a61155a commit 9245597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variant, use a [custom component](#8-new-components-prop). [This example](https:
* Any customisation through Material-UI theme is not applied to the elements. This would also mean toggling theme `mode` to **Dark**/**Light** would not affect the appearance of snackbars. You can easily use a [custom component](#8-new-components-prop) to have full control over your snackbars. [`This example`](https://github.com/iamhosseindhv/notistack/tree/master/examples/custom-snackbar-example) demonstrates how your snackbars can react to change of theme mode.

* Drop support for `withSnackbar` Higher-order component (HOC). Consequently, exported type `WithSnackbarProps` was kept in type declerations for backwards compatibility and after over a year, it has been now deleted and you should use `ProviderContext` type instead. You have two options to migrate your code:
* Option 1: Migrate your code to be functional component and use `useSnackar`.
* Option 1: Migrate your code to be functional component and use `useSnackbar`.
* Option 2: Remove `withSnackbar` and import the function(s) you need directly from `notistack`:
```diff
- import { withSnackbar } from 'notistack'
Expand Down

0 comments on commit 9245597

Please sign in to comment.