Front End Development Libraries Projects - Build a Random Quote Machine

I can’t see the hamburguer menu to run the tests for this project… can someone help me?

My codepen link: https://codepen.io/Baere/pen/oNQJGdX

My browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.188

Challenge: Front End Development Libraries Projects - Build a Random Quote Machine

Link to the challenge:

I believe the hamburger menu code is getting overwritten when rendering the react component.

ReactDOM.render(<QuoteBox />, document.getElementsByTagName("body")[0]);

This code replaces everything in the body tag with the render of your component. This is normally fine except in this case the hamburger menu and related code is already there and is overwritten.

To solve this you can add an element in the body and render your component inside that.

1 Like

Thank you. You solved it. <3

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.