Try not to over-React
import Knowledge from ‘./TheInternet/Udemy’;
My learning of basic JavaScript is fun, challenging and rewarding. I get a great sense of achievement whenever I am able to make a bit of code run that’s been giving me some trouble, there’s a feeling of satisfaction when that penny finally drops that is rivalled only by looting that epic two-handed sword from that raid boss you’ve been dying on for weeks (WoW addict here!).

A friend and mentor once told me to “treat learning like it’s an MMO” and “level-up” as much as possible, so, taking his advice, I decided to move on to the next dungeon of possibility, React. New dungeons are scary, you don’t know what’s in them, the encounters are difficult and there’s a 100% certainty you’re going to have to go back to the start and go again. Learning a new language can be a similar experience, there’s lots of new features, new syntax to remember and inevitable hair pulling moments when you just can’t seem to grasp what you’re trying to do.
Last night, while working through and online course on Udemy, I felt like I was hitting a brick wall. The new (to me) concept of importing and exporting JS files, or even working with multiple JS files was completely alien at first. Why am I supposed to start with an uppercase letter? why is that different from the variable that I exported? Why am I closing the browser and opening WoW?
I over-Reacted….. or maybe I didn’t React enough.
Tonight I went back to it, re-watched the earlier lessons (sometimes you need to go back to go forward) and just like that, the penny dropped.
I broke it down like this:
import NewComponent from ‘./MyComponent/NewComponent’;
import — that ones easy enough, I’m importing something from somewhere
NewComponent — This is what the component is going to referred to when I use it in my app.js file, for example <NewComponent />. why am I starting with an uppercase? When using JSX and Babel, its best to use uppercase to avoid clashing with reserved, HTML(ish) elements, such as input, button etc.
from — Where in the app folder am I looking for this?
‘./MyComponent/NewComponent’ — Here’s the location, look there and you’ll see something like: export default myComponent

I felt like I’d won my first battle, probably a small one on the grand scheme of things, but hey, you cant loot the last boss until you get past all the mobs in it’s way.