I have been scratching my head on this one for a few days now. When importing objects into my react components storybook chokes and gives me an error because my objects is undefined even though it shouldn't be.
This is the file i am trying to import but it
import * as news from './endpoints/news';
import * as games from './endpoints/games';
import * as loots from './endpoints/loots';
export default {
news,
games,
loots,
};
React component
import api from '../../core/api/models';
The error i am getting
Objects are not valid as a React child (found: TypeError: Cannot read properties of undefined (reading 'news')). If you meant to render a collection of children, use an array instead.