JS allows you to create shorthand anonymous functions, but it gets confused if you're trying to return an Object.
(a,b) => a+b
(a,b) => {sum: a+b} // cannot return an Object like this, because curlies mean body
(a,b) => { let sum = a+b; return sum; }JS constants prevent reassignment, but allow inner mutation. (i.e. like constant pointers to non-constant values in C).
const a = [];
a.push(1); // allowed
a = []; // not allowed// inside app/main/index.js
import Foo from 'app/main/foo';
import Bar from 'app/main/bar';
export default {
Foo,
Bar,
};// inside app/main/foo.js
import {Bar} from 'app/main'; // Circular Dependency will silently null all of `app/main`
import Bar from 'app/main/bar'; // <--- workaround that won't fail
// ...