Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vishalbhuse/component-heirarchy
https://github.com/vishalbhuse/component-heirarchy
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/vishalbhuse/component-heirarchy
- Owner: VishalBhuse
- Created: 2022-06-28T12:31:02.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-28T16:56:09.000Z (over 2 years ago)
- Last Synced: 2023-03-04T02:19:15.092Z (almost 2 years ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
Tic Tac Toe
In this project we have to create three component
In component is the parent component . In this component we are managing all our states , which tells us whether the latest move was a winning one. In this we also maintain move history.
In the component using props create a square box and map 9 div wrapped in the Square component.
In the component add a button onclick all 9 div positions and using props we are able to update value .
When all boxes x and o check horizontal,vertical and diagonal are using the helper.js file in this file we are checking all positions which are the winner.
We are mainly components that maintain our all states and they choose who is the winner.### `hierarchy diagram`
![image](https://user-images.githubusercontent.com/101569259/176237732-6f0cac3a-3280-4eac-a571-14eb51658d3e.png)