React: [website] Tutorial warning at 'Showing the moves'

Created on 29 Sep 2017  路  12Comments  路  Source: facebook/react

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.

starter

Most helpful comment

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.

All 12 comments

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

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.

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

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>.

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

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

@bvaughn please update the status of other issues also.

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

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

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 thank you so much

Was this page helpful?
0 / 5 - 0 ratings