Question from the React ⚛️ test

Write a React component that renders a simple h1 element

Archived

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: Archived(New question!)(Update)Question passed 853 times
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)
developer avatar
Auteur anonyme
26/08/2024
I fixed the english version