SG
Size: a a a
SG
I
const contentToFlatList = ({ content }, accumulator = []) =>
content.reduce((result, item) => {
if (item.content) {
return result.concat(contentToFlatList(item));
}
return result.concat([item]);
}, accumulator);
I
LK
const contentToFlatList = ({ content }, accumulator = []) =>
content.reduce((result, item) => {
if (item.content) {
return result.concat(contentToFlatList(item));
}
return result.concat([item]);
}, accumulator);
LK
LK
LK
SG
I
const contentToFlatList = ({ content }, accumulator = []) =>
content.reduce(
(result, item) =>
item.content
? result.concat(contentToFlatList(item))
: result.concat([item]),
accumulator
);
I
I
I
const contentToFlatList = ({ content }) =>
content.reduce(
(result, item) =>
result.concat(item.content ? contentToFlatList(item) : [item]),
[]
);
LK
LK
LK
LK
LK
TS
TS
LK