CS3219-AY2324S1 / ay2324s1-course-assessment-g05

A collaborative technical interview preparation platform that is going to boost your interview performance!
MIT License
0 stars 3 forks source link

Bugs found in collaboration service #128

Closed tryyang2001 closed 1 year ago

tryyang2001 commented 1 year ago

Bug 1:

  1. Matched two users.
  2. For one user, navigate to the dashboard page.
  3. Go back to the room page again, you will get 500, error indicating that:
    Too many re-renders. React limits the number of renders to prevent an infinite loop.

This is caused by 2 components: CodeEditor and ChatSpace, and they are related to socket events update and React state update (the dispatch function). There might be logic flaw or wrong implementation, need someone to take a deeper look and fix the issue.

Bug 2:

Ctrl A + Del/Backspace will cause the editor to crash/unmount

weidak commented 1 year ago

for 1) I suspect its with the listeners to an event, will take a look at it when im done adding more features to collab service! thanks ry

Update: 1. was caused by using useState() hooks before mounting, fixed it.

weidak commented 1 year ago

2 is also solved, same issue as 1. will close it in the latest pr