Skip to content

DOM Element Error #265

Nov 19, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi Lex! This issue is not related to the module, but I can help you out. The second parameter of ReactDOM's render method should be a reference to an HTML Element. I can't see the rest of your render method's implementation, so I'm not completely sure what you've entered. But an example could look like this;

// Get a reference to an HTML Element using its ID attribute in your HTML.
const rootElement = document.getElementById("root");

// Then render the app onto the document using the render method.
ReactDOM.render(
  <StrictMode>
    <App />
  </StrictMode>,
  rootElement
);

Let me know if this helps.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Dreitser
Comment options

Answer selected by Dreitser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants