Creating stories all the new components are saying `el.type is undefined`

Following LamaDev’s Social Media tutorial.
Running his API and React front end in separate containers.
He connects them in the final video of the series… so maybe I just need to mock the data?
But when I’ve added stories for all his components, I’m getting the same message of
el.type is undefined
so I figure it’s a common error with a common denominator
any advice in the forums?

link to devOps StoryBook

link to the repo

import React from 'react';

import { CloseFriend } from './CloseFriend';

export default {
  title: 'Example/CloseFriend',
  component: CloseFriend,
};

const Template = (args) => <CloseFriend {...args} />;

export const LoggedIn = Template.bind({});
LoggedIn.args = {
  user: {},
};

export const LoggedOut = Template.bind({});
LoggedOut.args = {};

solved it… I just needed to take the brackets off the imports
worked for everything but post and at least now I’ve got a fresh error of post undefined and that’s more likely to be solved with the missing mock

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.