Created
November 22, 2019 02:40
-
-
Save vereperrot/91bbf30d3ab7fdf33cab7bb5794041c6 to your computer and use it in GitHub Desktop.
react-component-in-file.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
class Car extends React.Component { | |
render() { | |
return <h2>Hi, I am a Car!</h2>; | |
} | |
} | |
export default Car; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import Car from './App.js'; | |
ReactDOM.render(<Car />, document.getElementById('root')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment