You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been posting about a problem of a code working on one site, but not the other..
Short answer is that apparently it works.. HOWEVER, in one of the sites it was giving me a yellow warning underline in my VS code, maybe comes from a Next.js warning? Who knows..
The warning starts by letting me know I needed to include a function that I am calling as a dependency in 2 useEffect functions that I have, from there is a chain of events that I need to include a useCallback in one section, and a useMemo in another section, and from there it screws up the communication to the api page and starts sending blank emails because it doesn't recognize the data sent to the api.... It's a complete re-do mess of code with something that is working fine in another site.
So, what is the proper way to go about it? Fix the warning and re-do the code? or ignore the warning as it seems to be working anyway ??
./components/chat/message-input.js
55:6 Warning: React Hook useEffect has a missing dependency: 'conversationId'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
102:6 Warning: React Hook useEffect has a missing dependency: 'emailChatHistory'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
122:6 Warning: React Hook useEffect has a missing dependency: 'emailChatHistory'. Either include it or remove the dependency array. react-hooks/exhaustive-deps
QUESTION...
How can I turn ESLint back on?
Additional information
ThisisthecodepagefromwhichIamgettingwarnings,andifItrytofixthem,thenIopenachainofcodefixingthatwon't allow proper function.
https://github.com/Elindo586/nextprojectd/blob/main/components/chat/message-input.js
This is the same code from another site that is not giving me warnings, and the code seems to be working just fine.
https://github.com/Elindo586/nextprojectb/blob/main/components/chat/message-input.js
^^^ The files working together for this to work are:
components/chat --- the main file there would be message-input.js
pages/api/openai.js
pages/api/chat-email.js
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I have been posting about a problem of a code working on one site, but not the other..
Short answer is that apparently it works.. HOWEVER, in one of the sites it was giving me a yellow warning underline in my VS code, maybe comes from a Next.js warning? Who knows..
The warning starts by letting me know I needed to include a function that I am calling as a dependency in 2 useEffect functions that I have, from there is a chain of events that I need to include a useCallback in one section, and a useMemo in another section, and from there it screws up the communication to the api page and starts sending blank emails because it doesn't recognize the data sent to the api.... It's a complete re-do mess of code with something that is working fine in another site.
So, what is the proper way to go about it? Fix the warning and re-do the code? or ignore the warning as it seems to be working anyway ??
QUESTION...
How can I turn ESLint back on?
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions