Tutorial comment.json not synchronised with server sources
Closed this issue · 4 comments
In the tutorial these parts point to a path not exactly the same than the server are providing:
https://facebook.github.io/react/docs/tutorial.html#fetching-from-the-server
<CommentBox url="/api/comments" />,
And https://facebook.github.io/react/docs/tutorial.html#updating-state
<CommentBox url="/api/comments" pollInterval={2000} />,
Where it should be url="/comments.json"
like in the repository
Issue really similar to #67 facebook/react#4673 #78
Actually I'll close, I believe the problem is the other way around and you are aware. Pull #69 started to solve the problem, but it need to be done for all server files
As of #79 we now use /api/comments
. Please make sure you have the latest copy of the tutorial code.
I'm not able to figure out is it a path to a folder named "comment" inside "api"??
Because in the turorial they have written something like (Try running this in your browser and changing the comments.json file (in the same directory as your server)
There's a comments.json
file in the root of the server project - https://github.com/reactjs/react-tutorial/blob/master/comments.json. HTTP requests are made to /api/comments
.