React is introduced in other files after creating a new file definition component.

for example, create a file that defines how the component Mycomponent, is introduced and used in App.js.

Mar.22,2021

you can try to build a project with create-react-app.
Mycomponent needs to be exported using export default Mycomponent.
can be introduced and used in App.js in the following ways. Pay attention to whether the introduced path is correct

.
import Mycomponent from './Mycomponent';
class App extends Component {
    render() {
        <Mycomponent/>
    }
}

you need something called routing

Menu