I have been running software teams for quite some time. They have all been backend PHP and Python developers. Now I have entered a new phase in leading a team of MERN Stack developers. MERN stands for Mongo, Express, React, and Nodejs. Now I have always had some familiarity with Javascript. I would use it to move some shit around on the page and that was kinda it. I would pull in JQuery as well to make it a bit easier and make Ajax calls for RESTful services.
A new challenger approaches
So at first I thought I could just pick everything up like any other language I have in the past but what I didn’t realize is that not only was I trying to learn a new framework but I was also pretty far behind on my knowledge of JavaScript.
ECMAScript 2015 (ES 6) was released came out in 2015 and was the first release in over 4 years. I completely ignored it and that was a mistake. The language has matured quite a bit. It has better inheritance and now with the new functional format, it’s quite nice. Here is a code example:
Old format
function foo() {
return true;
}
New format
const foo = () => {
return true;
}
Now from what you can see, you are assigning an anonymous function to a variable. I like how portable this makes your functions. It also works really well with React as you export the new constant to be used in other parts of the application.
This really works well with JSX witch will allow you to now use that constant like an HTML element within the app.
More tech to come
I will be visiting my work life from time to time and talk about the challenges that I am working on there in hopes it might also help you.
In the meantime, here is an awesome UDemy class on React and ES6: https://www.udemy.com/react-the-complete-guide-incl-redux