So I'm new in ReactJS and wants to learn a couple of small things, and here is one. I wrote an import code on App.js like this:
import React, { Component } from 'react';
import './App.css';
import Axios from 'axios';
import Load from './Loading.js';
I created a custom file for a loading animation and it's imported from import Load from './Loading.js'
the './Loading.js' is the file name and location, and the Load is a const that is exported from the Loading.js file
So my question is, if the
Loadis a const that I've been exported on the js file I've wrote, then where is the{ Component }from'react'is located? I was trying to find it on the node_modules folder but got no clue. even thereact.jsfile that I thought it was on the node_modules/react folder, I couldn't find it
Thank you before!
Component is declared inside react library, it's located inside the node_modules inside react's folder (maybe it's hard to find because the files are minified and packed) if you are using VsCode, you can click on the component and where the cursor is pointing on it then press F12 it will redirect you to the file where it's exactly declared.