Original code:
// React is loaded and is available as React and ReactDOM // imports should NOT be used class Username extends React.Component { state = { value: "" }; changeValue(value) { this.setState({ value }); } render() { const { value } = this.state; return
{value}
; } } function App() { function clickHandler() {} return (
Change Username
); } document.body.innerHTML = "
"; const rootElement = document.getElementById("root"); ReactDOM.render(
, rootElement); document.querySelector("input").value = "John Doe"; document.querySelector("button").click(); setTimeout(() => console.log(document.getElementById("root").innerHTML));
Dashboard
Start Trial
Sign In
Home
Product
Features
Use Cases
Customers
ROI Calculator
Integrations
Assessments
Tests
Questions
Pricing
Resources
Book: Evidence-Based Hiring
Blog
Support
Contact Us
Legal
For Jobseekers
© TestDome, 2024.