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

[website] Tutorial warning at 'Showing the moves' #10957

Closed
shaleh opened this issue Sep 29, 2017 · 12 comments
Closed

[website] Tutorial warning at 'Showing the moves' #10957

shaleh opened this issue Sep 29, 2017 · 12 comments

Comments

@shaleh
Copy link

shaleh commented Sep 29, 2017

I am running the code locally, using npm start. All was going well until I hit this section.

$ npm -v
3.10.10
$ node -v
v6.11.3

Here is what I see:

Compiled with warnings.

./src/index.js
  Line 84:  Links must not point to "#". Use a more descriptive href or use a button instead  jsx-a11y/href-no-hash

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

I grabbed the current code from this link https://codepen.io/gaearon/pen/EmmGEa?editors=0010 and I get the same warning as in the code I typed in manually. The text talks about this warning:

Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of "Game".

Which I am not seeing.

@Haroenv
Copy link
Contributor

Haroenv commented Sep 29, 2017

These are both just warnings, but I fixed them by changing the link to a button and adding keys:

https://codepen.io/Haroenv/pen/PJjOaG?editors=0010

@shaleh
Copy link
Author

shaleh commented Sep 29, 2017

Yes, I call them warnings. My point is I am not seeing the warnings the guide says I should. Plus the warning is very explicit about using '#'. So I thought it should be brought to attention.

@Haroenv
Copy link
Contributor

Haroenv commented Sep 29, 2017

The warning is in the browser, not in the terminal (which is showing your eslint warnings)

@bvaughn
Copy link
Contributor

bvaughn commented Sep 30, 2017

Haroen's right. The "key" warning should be in your browser (in the developer console). The lint warning you mention is in the terminal and depends on which linting tool/configuration you're using.

I agree though that we should change the <a> in question to be a <button>.

@fumblehool
Copy link

@bvaughn I would like to solve this issue but I will need your guidance.

@bvaughn
Copy link
Contributor

bvaughn commented Oct 3, 2017

Looks like a few people have already submitted PRs related to this, @fumblehool (#11061, #11045, #11007, #11006). I think it's covered. 😄

@bvaughn bvaughn closed this as completed Oct 3, 2017
@fumblehool
Copy link

@bvaughn please update the status of other issues also.

@bvaughn
Copy link
Contributor

bvaughn commented Oct 3, 2017

I don't know what other issue you're talking about.

@fumblehool
Copy link

I meant most of issues have PRs submitted by users. It is difficult to see if the issue is already covered or not.

@bvaughn
Copy link
Contributor

bvaughn commented Oct 3, 2017

I'm doing the best I can to review PRs and triage issues while also working on other things but there are way more people submitting PRs than there are copies of me. 😄 If you see an issue that looks outdated, please feel free to leave a comment.

@zwithz
Copy link

zwithz commented Jun 21, 2018

This warning occurs when you use tag with href="#", href={null} could work perfectly without warning. 😸

@viniciusll
Copy link

@zwithz thank you so much

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

No branches or pull requests

6 participants