Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

122
Views
Stroybook React gives TypeError when importing objects

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!