Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMagnus Martin
44,123 PointsDifference between Module and Component.
Where exactly is the difference between Module and Component? I know there are ES Modules. The folder in the project is named components. It's where modules live in files?!
1 Answer
Magnus Martin
44,123 PointsComing back to my own question a a couple of years later ;) I think it is meant like this: We break the App down in logical components or units like Header, Footer etc. and use ES modules (which is a javascript-specific term) to organize them.
Routine Poutine
26,050 PointsRoutine Poutine
26,050 PointsI'm pretty sure modules are pre-written software that are either included in an environment like the browser or Nodejs or something of your own doing. If it needs to be downloaded, its a package. In contrast, components are classes or functions written in React. I'm not sure what makes React a library rather than a module -- size?