## Guessing Game ๐ฎ (Ji(Jihye) and Mohamed)
---
<iframe src="https://giphy.com/embed/xUPGGDNsLvqsBOhuU0" width="480" height="360" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
## [Demo](https://reverent-varahamihira-23e4de.netlify.app/) ๐ฝ
---
## Plan (Jihye)
### App structure

---
### Project board

---
### Style

---
## bugs๐๐ (Jihye)
<iframe src="https://giphy.com/embed/l46CwEYnbFtFfjZNS" width="480" height="472" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
---
### Small mistakes eat time!

๐
โโ๏ธ ```return {}``` ๐
โโ๏ธ
๐โโ๏ธ ```return ()``` ๐โโ๏ธ
We spent a long time to figure out when our components didn't return anything. It was because we used {} after return with React we should use () to return.
---
### Still working on it
```
function checkFollower(val) {
return followersList.includes(val);
}
if (checkFollower(value)) {
setScore(score + 10);
return (
<div className="flex-row">
<p>Points</p>
<div className="round">{score}</div>
</div>
);
} else {
return (
<div className="flex-row">
<p>Points</p>
<div className="round">{score}</div>
</div>
);
}
```
---
### File structure matters

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 ๐ฅณ
---
```
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
},
```
---
### Running effects
```
React.useEffect(() => {
fetch(url + props.name)
.then((res) => res.json())
.then((data) => setUserName(data));
}, []);
```
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 problems (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
---
### Learnings
- [ ] useEffect
- [ ] Getting kicked๐ฆต out Github API

- [ ] learning new syntax
- [ ] Netlify deployment
- [ ] false sense of confidence ๐คซ
---
## Future Improvements
<iframe src="https://giphy.com/embed/13FrpeVH09Zrb2" width="480" height="262" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
- [ ] css
- [ ] Time limits removing you from the gameโฐ
- [ ] maintaining user sessions.
- [ ] more instructions about the inputs (aria-label)
---
## Future Improvements
<iframe src="https://giphy.com/embed/3o6MbokumzM4Vo8QRW" width="280" height="366" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p>
- [ ] scoring board ๐
- [ ] scoring counter
---
## Any Questions
<iframe src="https://giphy.com/embed/lCN6LF3S1fQWc" width="417" height="480" frameBorder="0" class="giphy-embed" allowFullScreen></iframe>
{"metaMigratedAt":"2023-06-16T13:26:10.464Z","metaMigratedFrom":"YAML","title":"Guessing Game (Ji(Jihye) and Mohamed)","breaks":true,"description":"View the slide with \"Slide Mode\".","contributors":"[{\"id\":\"1ae0974c-1a1b-4ae5-acee-c1dc5af8fc80\",\"add\":2028,\"del\":94},{\"id\":\"0a3ab15b-3310-4524-96d0-8240b9d0005e\",\"add\":1758,\"del\":379}]"}