diff --git a/src/index.tsx b/src/index.tsx
index dbcca73..19cdfe1 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,6 +1,6 @@
'use client';
-import React, { forwardRef } from 'react';
+import React, { forwardRef, isValidElement } from 'react';
import ReactDOM from 'react-dom';
import { CloseIcon, getAsset, Loader } from './assets';
@@ -354,7 +354,7 @@ const Toast = (props: ToastProps) => {
) : null}
{/* TODO: This can be cleaner */}
- {toast.jsx || React.isValidElement(toast.title) ? (
+ {toast.jsx || isValidElement(toast.title) ? (
toast.jsx ? (
toast.jsx
) : typeof toast.title === 'function' ? (
@@ -389,7 +389,7 @@ const Toast = (props: ToastProps) => {
) : null}
- {React.isValidElement(toast.cancel) ? (
+ {isValidElement(toast.cancel) ? (
toast.cancel
) : toast.cancel && isAction(toast.cancel) ? (
) : null}
- {React.isValidElement(toast.action) ? (
+ {isValidElement(toast.action) ? (
toast.action
) : toast.action && isAction(toast.action) ? (