React - Write a React Component from Scratch

document.getElementByID is not a function
Describe your issue in detail here.

Your code so far

// Change code below this line
class MyComponent extends React.Component {
  
  constructor(props){
    super(props);
  }
  render(){
    return(
      <div id="challenge-node">
    <h1>My First React Component!</h1>
    </div>);
  }
} 
ReactDOM.render(<MyComponent/>, document.getElementByID("challenge-node"));

Your browser information:

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

Challenge: React - Write a React Component from Scratch

Link to the challenge:

Its document.getElementById not document.getElementByID

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