intro-section with dropdown nav and sibebar nav using ReactJS no JSX
Design comparison
Solution retrospective
what is your strategy to finish a project faster? apparently putting a button element inside a button element creates an error, how do you solve this without replacing the button with a different element?
Community feedback
- @seanred360Posted over 2 years ago
The site itself looks really good. I am really curious why you di not use JSX. I have never seen someone do something like this. I find JSX is a lot easier for other developers to read. Also can you explain why you want to put a button inside a button? A button is not supposed to be put inside a button because when you click one button the onClick event will bubble to the other element and it will also get clicked. So a button in a button behaves like 1 button always. Why not make 1 button that has a <span> inside and put whatever you need inside that?
1@muammarFaizPosted over 2 years ago@seanred360 Thank you. yes, jsx makes the job much easier, but I find it annoying to install babel in general especially if I just want to create one or two website sections/pages, and create-react-app can drain my internet data if I use it every time I want to use react. about the nested button error, it was my silly mistake to put react root inside the button and render the whole sidebar navigation inside it and I was too lazy to change the button because that means I have to edit my css, I don't remember how I solve it most likely I did change the button into div.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord