Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Tutorial improvement: react nodes have to be encapsulated in one container #1177

Open
RVMendoza opened this issue Oct 6, 2017 · 3 comments

Comments

@RVMendoza
Copy link
Contributor

https://github.com/phenomic/phenomic/blob/master/packages/preset-react-app/docs/getting-started/5.md

When we tell people to add this section to their component after the list, it creates two nodes that are not contained. It is a ul and a div.

We should somehow mention that you need to surround the two in a div before adding that extra snippet to Older Posts, because react will only load things encapsulated by a single node.

CONTEXT:

Before adding it in the query, we need to actually create a link to access next page! Let's add a link in our Home, after our list of posts

<div>
  {posts.node &&
  posts.node.hasNextPage && (
    <Link to={`/after/${posts.node.next}/`}>Older posts</Link>
  )}
</div>;

Perhaps we could show the entire snippet to show what it looks like after adding this section into it?

This is a fantastic tutorial so far. Very clear.

Just wanted to fill in the holes for people because a source of a lot of my frustrations many tutorials out there is that they assume the user knows more than they do.

@MoOx
Copy link
Owner

MoOx commented Oct 6, 2017

All improvements are welcome. The more it contains the clearer it will be. So I am ok to add anything you find missing! If you add anything, please also update the example https://github.com/phenomic/phenomic/tree/master/examples/react-app-getting-started
❤️

@ghost
Copy link

ghost commented Feb 7, 2019

Hello,
I've made changes to the 05.md that will help with this issue. If you like to see, here is the link:
link to the tutorial-document-changes branch:
https://github.com/nalanirojas25/phenomic/tree/tutorial-document-changes

Direct link to 05.md file:
https://github.com/nalanirojas25/phenomic/blob/tutorial-document-changes/packages/preset-react-app/docs/getting-started/05.md

Hope this made it better!
Let me know if you like the changes and I'll make a PR.
Thanks a ton for this tutorial! :)

@MoOx
Copy link
Owner

MoOx commented Feb 7, 2019

@nalanirojas25 looks good to me. Just be sure to commit with the same email that you use for github to be credited properly (you can use --amend --author or something like that to edit author of a commit). Just ask if you need help.

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

No branches or pull requests

2 participants