Question from the React ⚛️ test

Write a React component that renders a simple h1 element

Easy

These two codes are equivalent

ReactDOM.render(
    React.createElement('h1', null, 'Hello, World!'),
    document.getElementById('root')
);
ReactDOM.render(<h1>Hello, world!</h1>, document.getElementById('root'));
Author: W3D TeamStatus: Published(Update)Question passed 853 times
Edit
0
Community Evaluations
developer avatar
Incorrect answer
Auteur anonyme
15/08/2024
They are not the same, in one it's "world" (lowercase) and in the other "World" (uppercase)