Closed divyeshradadiya closed 3 months ago
@divyeshradadiya Thank you for your pull request. Merging.
FYI:
I'm in the process of re-factoring / re-writing the entire React part of the project. New code here: https://github.com/nluxai/nlux/pull/43 ( not merged yet ).
1) Renamed the inner function to updateAiChatProps for clarity and readability. 2)Moved the call to handleNewPropsReceived inside the updateAiChatProps function to encapsulate the logic for updating the AI chat props. 3) Ensured that the update of AI chat props is only performed if isUseEffectCancelled is false, new props are available, and the AI chat instance (aiChat.current) exists. 4)Updated the useEffect dependency array to include props and currentProps for proper dependency tracking.