My first React app. I'm not sure about files structure. Any advice are welcome 🤗 !
SpyrosAliv
@SpyrosAlivAll comments
- @tasandraSubmitted over 1 year ago@SpyrosAlivPosted over 1 year ago
Great work.
As for the structuring, you could possibly have split it into more components or move the data fetching to another file, but since this is a pretty simple project, it isn't really necessary. There's a glitch where you need to click the button more than once to actually generate a new advice.
Marked as helpful0 - @LanXhanSubmitted over 1 year ago
Day 1[reboot] Hello any advice on what to improve? Also I have difficulties in centering div tags
Thank you!
@SpyrosAlivPosted over 1 year agoGreat solution!
As for centering an element inside another element, flexbox is the way to go. By setting the display of the parent element to "flex", you can set the following attributes to the child "self-align: center; justify-self: center;". This will center the element both vertically and horizontally inside the parent element.
Marked as helpful1