Top "Arrow-functions" questions

Questions about the compact function syntax in ECMAScript2015 (ES6) called "arrow functions" because of their use of "=>".

Correct use of arrow functions in React

I am using ReactJS with Babel and Webpack and using ES6 as well as the proposed class fields for arrow …

javascript reactjs arrow-functions ecmascript-next class-fields
When should I use `return` in es6 Arrow Functions?

The new es6 arrow functions say return is implicit under some circumstances: The expression is also the implicit return value …

javascript function return ecmascript-6 arrow-functions
Using jQuery $(this) with ES6 Arrow Functions (lexical this binding)

Using ES6 arrow functions with lexical this binding is great. However, I ran into an issue a moment ago using …

javascript jquery ecmascript-6 arrow-functions
Is it possible to export Arrow functions in ES6/7?

The export statement below gives a syntax error export default const hello = () => console.log("say hello") why ? I'm only …

javascript ecmascript-6 arrow-functions
Arrow function "expression expected" syntax error

I want to transform this code: var formatQuoteAmount = function (tx) { return Currency.toSmallestSubunit(tx.usd, 'USD'); }; var quoteAmounts = res.transactions.…

javascript node.js ecmascript-6 arrow-functions
Why shouldn't JSX props use arrow functions or bind?

I'm running lint with my React app, and I receive this error: error JSX props should not use arrow functions …

javascript reactjs ecmascript-6 jsx arrow-functions
Expected to return a value in arrow; function array-callback-return. Why?

I'm having some issues understanding why I'm getting a compile warning on this piece of my react code fetch('/…

javascript arrays ecmascript-6 arrow-functions
Using _ (underscore) variable with arrow functions in ES6/Typescript

I came across this construct in an Angular example and I wonder why this is chosen: _ => console.log('Not …

javascript typescript ecmascript-6 arrow-functions
ES6 arrow functions and array.map

I am trying to understand some shorthand ways of writing ES6. What I cannot fully understand in the example below …

javascript arrays ecmascript-6 arrow-functions
Declaring a function in ES6?

I wanted to "update" my javascript code to the new ES6 Standard, so I looked at how functions are now …

javascript function ecmascript-6 arrow-functions