Build error because act(...) is not supported in production version of React

No matter how I disable cache or reword my code, I can’t get the build error to go away, so it’s a server side issue. If anyone else has ideas on how to fix, it would be greatly appreciated.

My code so far:


// change code below this line
class MyComponent extends React.Component{
constructor(props) {
  super (props)
}

render() {
  return (
    <div>
      <h1>My First React Component!</h1>
    </div>
  );
}
}

ReactDOM.render(MyComponent, "challenge-node")

Your browser information:

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

Challenge: Write a React Component from Scratch

Link to the challenge:

It’s your second argument to ReactDOM.render. I believe it should be an HTML element, not just the id string.

the code is evaluated in the browser, it is not sent to the server to be evaluated

Ah, that does seem to be part of it. Coming back today, I think the main issue was something strange with my Wifi and my browser that takes too long to explain here. It was causing everything to act a little off, including the FCC webpage. Everything is fixed now, though.

I phrased that without clarifying, sorry. I was referring to an old issue on FCC’s part in late 2019 having to do with incorrect caching of hashed files as unhashed ones, causing seemingly the same issue I was having. It ended up being a combination of strange WiFi and browser issues as well as a minor code error on my part both making the webpage act weirdly.

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