I cloned the create-react-app repo and added a js file: Address.js. This is a component that I built using React. How can I run Address.js separately?
You want to run any components you created inside your App.js.
Make sure you import your component first. For ex.
import Address from "./components/Address"
Then you can render it inside your render function. For ex.
render () {
return (
<Address />
)
}
1 Like