ES6 code styles best practices

Recently I've started to learn ReactJS and consequently - ES6. I'm quite familiar with ES5, but some things are not that clear for me. Example 1: Methods syntax What is the difference between the following two methods? export class InvoiceForm ext...
more »

2017-12-03 22:12 (2) Answers

Equivalent of set in ES6 to ES5

I have a set in which I am iterating over in ES6. I am trying to convert it to its equivalent in ES5. My build is getting failed because of ES6. That's why I am converting it to ES5. Here's my code in ES6 service.getDevices = function (date) { ...
more »

2017-10-24 19:10 (3) Answers

Javascript filter values from array

I have an array of arrays and each of those arrays contain two elements. How can I return the second element from array by filtering the first element? For example I have the following array and my function should return the second element from each...
more »

2017-10-11 09:10 (7) Answers

How do you give components a name in react?

When I am debugging using the browser console console or react dev tools, they always refer to my components as "Constructor" and I would like to change that. See the example below: I would have hoped to set defined names for my components so they...
more »

2016-10-24 09:10 (2) Answers