Open inseokr opened 4 years ago
reset C:/webdev/mern/MERN_linkedspace/src/client/contexts/MessageContext.js:81 78 | { 79 | console.log("MessageContext: being reset"); 80 | console.log("MessageContext: current channel name = " + currChannelInfo.channelName );
81 | setChannelContexts([]); 82 | setChannelContextLength(0); 83 | setNumOfMsgHistory(0); 84 | setNewMsgArrived(false);
× Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops. ▶ 4 stack frames were collapsed. reset C:/webdev/mern/MERN_linkedspace/src/client/contexts/MessageContext.js:81 78 | { 79 | console.log("MessageContext: being reset"); 80 | console.log("MessageContext: current channel name = " + currChannelInfo.channelName );
81 | setChannelContexts([]); 82 | setChannelContextLength(0); 83 | setNumOfMsgHistory(0); 84 | setNewMsgArrived(false); View compiled GeneralChatMainPage C:/webdev/mern/MERN_linkedspace/src/client/container/GeneralChatPage/GeneralChatMainPage.js:31 28 | { 29 | // ISEO-TBD: switching to "2" will be possible only within the dashboard?? 30 | console.log("ISEO: need to re-initialize the context: full mode"); 31 | reset(0); 32 | } 33 | 34 |
Not sure what's happening.. .but the problem went away after converting it back to component.
Infinite rendering problem observed.