Slack Clone Coding [Real-time Chat with React]
Let's start full-scale React web development by building a Slack clone! From sign-up and login to creating rooms and real-time chat!
2,896 learners
Level Intermediate
Course period Unlimited
fetcher grammar related
I'm sharing this because so many people are making this mistake. I get asked this question two or three times a month.
In @utils/fetcher.ts
(...) => ( axios.get(...) ) instead
(...) => { axios.get(...) }
There are many people who do this. These two are completely different. They produce completely different results.
In conclusion, you should do ( axios.get(...) ).
This is syntactically equivalent to { return axios.get(...) }.
Please add return or wrap it with ( ) instead of { }.
If you don't understand why, quickly study the arrow function syntax again.




