When we use the npm package reselect (with React), we may do
export const someData = createSelector(
objs,
(objs) => {
// ...
});
and I think someData
is actually a function? But inside of our Component's .jsx
file, we could show it as:
{someData[0].countThumbUp}
so it is somewhat strange, when someData
is a function, but we can somehow treat it as an array. How does it work?