Closed MoonLGH closed 1 year ago
Name | Link |
---|---|
Latest commit | 72e2742e2d3ff902ed2d6f76ac991365cec4c07e |
Latest deploy log | https://app.netlify.com/sites/create-your-password/deploys/633c3f00a8375c000a43ccc9 |
Deploy Preview | https://deploy-preview-7--create-your-password.netlify.app/ |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Thanks a lot for your contribution.
Can you explain the purpose of removing the App.js file?
umm, why not let me ask you this, why are you making a file (let's just call it file A) that just import from TextArea.js and export it, so another file (let's call it file B) can import from file A, that is just the same thing as importing TextArea.js directly to file B
or like this
a.js
export const x ="hello world"
b.js
import x from "./a.js"
export x
c.js
import x from "./b.js"
//actually using the x here
then what the purposes of b.js if you can directly import from a.js
oh, Now it's clear..
But why do they provide App.js by default in create-react-app?
well, this is my assumption, app.js on create-react-app is used if you had more than 1 component to render, so if you had like component from, a b c d, you can mix them in app.js so index.js just import 1 component from app.js but in this scenario, app.js only import 1 component, so why not just put it inside index.js
Now It's clear. thank you..
Checkmark
List Changed