reactjs/react-tutorial

comments.json in the wrong place?

robbyemmert opened this issue · 3 comments

According to the tutorial here: http://facebook.github.io/react/docs/tutorial.html, comments.json is supposed to be in public/comments.json. The POST action is reading/writing comments.json in the root directory.

zpao commented

Eh, the tutorial and the server portion here overlap. So it's right. But then it's wrong :(

The first few steps of the tutorial can be done without a server but once you get to POSTing, you need the server. The endpoint is just /comments.json so for those first few steps, GETting from public/ works. We really do need to clean up the tutorial, maybe just make the server part properly integrated.

I'm going to close out because there's no quick fix and requires a full pass on this. But we are aware of the issue. Thanks for bringing it up and sorry that it caused confusion.

Actually, I got comments.json saving and loading to the right place with a pretty quick fix. Hopefully it helps. See my pull request #69. Thanks!

By the way, thanks for the tutorial, it was a great intro to React!