| by Gagandeep Singh | No comments

ES7 features you should be using.

Array includes() method The old way to check if some value is present inside an array was to use Array’s indexOf() method. IndexOf() returned -1 if element is not found or else the position of element if it’s present in the array. Exponential operator Similar to Math.pow(), the exponential operator ** was introduced in ES2016. […]

Read More
| by Gagandeep Singh | No comments

Container vs Presentational Components in ReactJS

Presentational/Functional/Stateless Components Functional components in ReactJS is a simpler way of creating components. Some of the key features of functional components are: It is best suitable for components which only consists of a render method They are also called stateless components since they don’t have an internal state and just make use of props to […]

Read More
| by Gagandeep Singh | No comments

Understanding Middleware in ExpressJS

Thing missing in NodeJS NodeJS is used for writing JavaScript which executes at the server. At client side browser is responsible for handling the JavaScript. So, whenever we use pure NodeJS for creating backend applications our app contain a single function for each incoming request which is responsible for doing all the processing based on […]

Read More
| by Gagandeep Singh | No comments

Don’t need to restart your Node server again and again?

While doing development on any NodeJS application, whenever we make any change to some file we need to restart our Node server from the command prompt/terminal. This is a repetitive process since we make hundred of changes and restart server every time to check the change. Solution to this issue is using a tool called […]

Read More
| by Gagandeep Singh | No comments

ExpressJS installation and basic routing

Before beginning with ExpressJS make sure you have nodejs installed on you machine. What is ExpressJS? ExpressJS is a NodeJS framework for creating server side applications. ExpressJS provides many shorthand methods for writing the functionality provided by NodeJS. Installing ExpressJS Step 1 : Goto your application directory Step 2 : Initialize your node project (create […]

Read More