Team MJ We built 🎮 The Guessing Game 🎮 using React with Github API. We wanted to let users to present their Github followers and then guess followers' username on Github.👀
- Accept some user input (e.g. a username)
- Query an API (e.g. the Github API, or any other fun one)
- Populate the UI with API data
- Have some form of persistent state and interactivity,
- Save your state to localstorage so you can leave the page and come back later
- Make it look great
- I want to get to know my followers I want to try to remember their username.
- I want to get my username and present profile on the page so I can make sure I'm looking at my followers.
- I would like to be able to search my followers and present them only when I get their name correct.
- I want to have some time limit so the game can be more interesting
- I also want to get some reward when I get my followers name correct.
- We spent a long time to figure out when our components didn't return anything. It was because we used
{}
afterreturn
with React we should use()
toreturn
. - When we depoloyed our app on Netlify, it didn't render our components properly. I could be we didn't have out package.josn on the top level or we had a nested directory. After relocating everything we were able to deploy out app 🥳
- When we used
reactEffect()
to update state, we put an empty array as a second argument or put some values inside of the array. It caused a lot of problemd (e.g exceeding API limit, state is not being updated). We now know when to use empty/non empty array or just leave it empty
Co-authored-by: Mohamed 76549147+Alisyad9@users.noreply.github.com Co-authored-by: jijip41 78619809+jijip41@users.noreply.github.com