---
# System prepended metadata

title: mfChess TechStack Notes

---

# mfChess TechStack Notes
[Markdown Cheat Sheet](https://www.markdownguide.org/cheat-sheet/)
## GraphQL
- tutorial: https://www.youtube.com/watch?v=YyUWW04HwKY
- https://www.youtube.com/watch?v=Dr2dDWzThK8
- https://www.youtube.com/watch?v=xUQ-hNRHCgs
## Typescript
- React & Typescript: https://www.youtube.com/watch?v=FJDVKeh7RJI
- Express & Typescript
- Cheatsheet: https://github.com/typescript-cheatsheets/react


## Concurrency (Async/Await) 
- This video explains the development of Callbacks -> Promises -> Async/Await: https://www.youtube.com/watch?v=NsQ2QIrQShU&t=1579s
- ```Promise.all([promise1, promise2])``` : waits for all promises to resolve

## Express Routing
- tutorial: https://www.youtube.com/watch?v=iM_S4RczozU

## Error Handling Best Practices 
- Use try-catch blocks 
- Create custom error types
- Use middleware to handle errors centrally
- Return errors to the client, including a **status code** and a meaningful error message

## useContext Good Practices
- tutorial: https://www.youtube.com/watch?v=5LrDIWkK_Bc

## Miscellaneous
- useEffect running twice: https://stackoverflow.com/questions/60618844/react-hooks-useeffect-is-called-twice-even-if-an-empty-array-is-used-as-an-ar

## Chess.js
- https://github.com/jhlywa/chess.js/blob/master/README.md
- FEN position

## MongoDB, Mongoose
- Update an array(two ways): https://stackoverflow.com/questions/33049707/push-items-into-mongo-array-via-mongoose

## Local Storage
- https://www.youtube.com/watch?v=AUOzvFzdIk4