Skip to content

Commit

Permalink
Revert "add deprecation notice for v10"
Browse files Browse the repository at this point in the history
This reverts commit 3eaed7c.
  • Loading branch information
fkhadra committed Oct 29, 2022
1 parent 7740d11 commit c0d3043
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion src/hooks/useToast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export function useToast(props: ToastProps) {
{ once: true }
);

// TODO: Remove me in v10
if (isFn(props.onOpen))
props.onOpen(isValidElement(props.children) && props.children.props);

Expand Down
12 changes: 1 addition & 11 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,22 +193,12 @@ export interface ToastOptions<Data = {}> extends CommonOptions {
className?: ToastClassName;

/**
* @deprecated starting v10
* Use toast.onChange instead
*
* See https://fkhadra.github.io/react-toastify/listen-for-changes/
*
* Called when toast is mounted.
*/
onOpen?: <T = {}>(props: T) => void;

/**
* @deprecated starting v10
* Use toast.onChange instead
*
* See https://fkhadra.github.io/react-toastify/listen-for-changes/
*
* Called when toast is mounted.
* Called when toast is unmounted.
*/
onClose?: <T = {}>(props: T) => void;

Expand Down

0 comments on commit c0d3043

Please sign in to comment.