--- id: 5a24c314108439a4d4036168 title: Write a React Component from Scratch challengeType: 6 isRequired: false videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'getUserInput => assert(getUserInput("index").replace(/\s/g, "").includes("classMyComponentextendsReact.Component{"), "There should be a React component called MyComponent.");' - text: '' testString: 'assert((function() { const mockedComponent = Enzyme.mount(React.createElement(MyComponent)); return mockedComponent.find("h1").text() === "My First React Component!"; })(), "MyComponent should contain an h1 tag with text My First React Component! Case and punctuation matter.");' - text: '' testString: 'assert(document.getElementById("challenge-node").childNodes.length === 1, "MyComponent should render to the DOM.");' ```
## Challenge Seed
```jsx // change code below this line ```
## Solution
```js // solution required ```