My understanding of the module system in Javascript/Node

Importing and exporting things in React, and generally in Javascript, can be confusing if one doesn’t really understand how the Node.js module system, and Javascript object referencing work.

Here are some examples that may lead to one wondering what exactly is going on behind the scenes.

Kawere Wagaba

Creator. Human. Curious.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store