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

Nested component tutorial issue #238

Closed
caneta opened this issue May 16, 2017 · 2 comments
Closed

Nested component tutorial issue #238

caneta opened this issue May 16, 2017 · 2 comments

Comments

@caneta
Copy link

caneta commented May 16, 2017

I'm following your tutorials, JSX version.
Everything works fine till the nested component one: I copy and paste all the code and when I run it, in the browser console I get the following :

Uncaught ReferenceError: CloseHeader is not defined

Is there some import missing?

@mthadley
Copy link

@caneta Correct, you will need to import CloseHeader:

import CloseHeader from './path/to/Closeheader';

Alternatively, you could just define CloseHeader in the same scope as the Modal component.

@caneta
Copy link
Author

caneta commented May 16, 2017

Ok, the file is in the same directory of Modal.js so using the following, it works:

import CloseHeader from './Closeheader'

It would be great to update the documentation...thank you!

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

3 participants