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

On "part-one" tutorial page, some step outputs an error #10660

Closed
AdrianoCahete opened this issue Dec 26, 2018 · 4 comments · May be fixed by saurabharch/gatsby#2383 or ajesse11x/gatsby#2220
Closed

On "part-one" tutorial page, some step outputs an error #10660

AdrianoCahete opened this issue Dec 26, 2018 · 4 comments · May be fixed by saurabharch/gatsby#2383 or ajesse11x/gatsby#2220
Labels
type: question or discussion Issue discussing or asking a question about Gatsby

Comments

@AdrianoCahete
Copy link

Summary

On Part One tutorial, on step "Using sub-components", step 4:

Head back to src/components/header.js, and make the following change:
export default props => <h1>{props.headerText}</h1>

But when build runs, an error occurs:

Failed to compile

./src/components/header.js
Module Error (from ./node_modules/eslint-loader/index.js):

  3:27  error  'props' is not defined  no-undef

Is something that the tutorial is wrong or is something that i'm doing wrong?

@sidharthachatterjee
Copy link
Contributor

@AdrianoCahete Can you paste your header.js file after making the change?

The error you are seeing is eslint complaining that props is not defined. Perhaps you forgot to
replace () in export default () => <h1>This is a header.</h1> with props?

@sidharthachatterjee sidharthachatterjee added the type: question or discussion Issue discussing or asking a question about Gatsby label Dec 26, 2018
@AdrianoCahete
Copy link
Author

Perhaps you forgot to replace ()

Yes, this exactly! Thanks and sorry for that :D

@sidharthachatterjee
Copy link
Contributor

@AdrianoCahete No worries at all, we're here to help 🙂

@verlok
Copy link

verlok commented Apr 14, 2019

Perhaps you forgot to
replace () in export default () =>

This is a header.

with props?

That worked for me too. I made the same mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question or discussion Issue discussing or asking a question about Gatsby
Projects
None yet
3 participants