Message from JavaScript discussions

August 2018

— It doesn't have to be cyclic at the root level though?

— 

const arr = [ 1, 2, 3, 4 ];

const add2 = x => x + 2;

const log = console.log;

arr.map(add2)
// -> [ 3, 4, 5, 6 ]
arr.forEach(add2)
// -> undefined
arr.map(log)
// logs 1, 2, 3, 4
// -> [ undefined, undefined, undefined, undefined ]
arr.forEach(log)
// logs 1, 2, 3, 4
// -> undefined


map: use when you need a transformed (mapped) array
forEach: use when you just need to iterate and perform some side-effect (rare)

— Hey any react experts here? im thinking about Performance, and whats normal in that sense…?

— Whats my bottleneck?

— Or is anyone here who has kind of a frustrating time with that vis timeline ?

— I see no problem. 300ms load is ok

— Ok

— Still laggy

— Mabye its the heat and my pc

— I guess dragging around in the vis timeline makes a lot of funny things solwing it down

— Event handler or microtask should finish in 50ms. load time okay is seconds

— Dragging around looks like this