Created
December 20, 2020 03:32
-
-
Save meramos/5e8947254abfff8f7f93590c945aba3a to your computer and use it in GitHub Desktop.
(shorter code) Update divs which were added earlier so that their class values are defined based on the current image per item.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // dressupState was defined earlier | |
| <div id="container"> | |
| <div id="background"> | |
| <div id="body"></div> | |
| { Object.keys(dressupState).map((item) => | |
| <div id={item} className={item+(dressupState[item].current+1)} key={item}></div> | |
| ) | |
| } | |
| </div> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment