diff --git a/examples/next-openai/components/ai-elements/reasoning.tsx b/examples/next-openai/components/ai-elements/reasoning.tsx index d999ca26db3b..7b10e25c8ab1 100644 --- a/examples/next-openai/components/ai-elements/reasoning.tsx +++ b/examples/next-openai/components/ai-elements/reasoning.tsx @@ -9,7 +9,14 @@ import { import { cn } from '@/lib/utils'; import { BrainIcon, ChevronDownIcon } from 'lucide-react'; import type { ComponentProps } from 'react'; -import { createContext, memo, useContext, useEffect, useState } from 'react'; +import { + createContext, + memo, + useContext, + useEffect, + useMemo, + useState, +} from 'react'; import { Response } from './response'; type ReasoningContextValue = { @@ -95,7 +102,15 @@ export const Reasoning = memo( return ( ({ + isStreaming, + isOpen, + setIsOpen, + duration, + }), + [isStreaming, isOpen, setIsOpen, duration], + )} >