NW | 26-SDC-Mar | TzeMing Ho | Sprint 2 | Chat App frontend and backend#78
NW | 26-SDC-Mar | TzeMing Ho | Sprint 2 | Chat App frontend and backend#78TzeMingHo wants to merge 9 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
The code could use some comments.
A useful rule of thumb is to ask yourself whether you could still explain how the code works six months from now. If the answer is uncertain, consider adding a comment to help future readers understand the intent and reasoning behind it.
Can you also include this item in the PR description?
- A description of the additional features you have implemented.
…ring from state, replaced input handler by formSubmithandler, pending to fix deploy version
cjyuan
left a comment
There was a problem hiding this comment.
Changes look good. I just have two more comments.
| const lastMessageTime = state.messages.at(-1)?.timestamp ?? null; | ||
| const queryString = lastMessageTime ? `?since=${lastMessageTime}` : ""; | ||
| const url = `${state.backendURL}/messages${queryString}`; | ||
| const milliseconds = 100; |
There was a problem hiding this comment.
Can you think of a better name. milliseconds is too generic.
| const url = `${state.backendURL}/messages${queryString}`; | ||
| const milliseconds = 100; | ||
| try { | ||
| // fetch may remain pending up to 25 seconds |
There was a problem hiding this comment.
Could also explain "why". That's probably the first question that comes to mind when someone sees that comment.
|
Looks good. Well done! |
|
Closing PR because the SDC run has finished. Feel free to re-open if you're still working on it. |
Learners, PR Template
Self checklist
Changelist
frontend link:
https://tzemingho-chatapp-server-frontend.hosting.codeyourfuture.io
backend link:
https://tzemingho-chatapp-server-backend.hosting.codeyourfuture.io
A description of the additional features I have implemented.
Frontend:
Backend: