Try not to over-React

David McCallum
Sep 5, 2018 · 2 min read

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!).

“You are not prepared”

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

Live footage of me, once I got my JS pages linked.

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.

Written by

Software Developer @Waracle

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade