Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

el.type is undefined #2

Closed
TurtleWolfe opened this issue Sep 28, 2021 · 1 comment
Closed

el.type is undefined #2

TurtleWolfe opened this issue Sep 28, 2021 · 1 comment

Comments

@TurtleWolfe
Copy link
Owner

TurtleWolfe commented Sep 28, 2021

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

Screenshot from 2021-09-28 12-22-51

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 = {};
@TurtleWolfe
Copy link
Owner Author

I just needed to take the brackets off the imports,
Post is undefined, but at least it's a new error and I think I understand it, mocking may be an option soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant