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

Implementing a Note Application - #413

Open
ggirton opened this issue Jun 21, 2016 · 4 comments
Open

Implementing a Note Application - #413

ggirton opened this issue Jun 21, 2016 · 4 comments

Comments

@ggirton
Copy link

ggirton commented Jun 21, 2016

I found the syntax in this part not explained. After the 1st curly brace It is going into javascript with notes.map, but then it goes back out when it hits the

  • list item? Not sure what's going on there, just thought I'd mention. The book is excellent so far, this is the 1st puzzling thing I hit. (Altho there were 6 deprecated packages you're using when I brought in the latest node. Well, things change :-) )

    export default () => (

      {notes.map(note =>
    • {note.task}
    • )}
    )
  • @bebraw
    Copy link
    Member

    bebraw commented Jun 22, 2016

    You mean

    export default () => (
      <ul>{notes.map(note =>
        <li key={note.id}>{note.task}</li>
      )}</ul>
    )

    right in the start? The curlies come from JSX. That's why I have those bullets right below the code example but I don't mind improving this. 👍

    Good point about deprecations. I can fix some of that but not everything. It all moves so fast in the Node world.

    @ggirton
    Copy link
    Author

    ggirton commented Jun 22, 2016

    Thank you! By the way, I had a one-hour duration time looking up the following phrase

    () =>

    it is very hard to google for! (and not an idiom in the FB React docs, at least in the beginning)

    Finally I found this summary which not only explained it, but also included the incredible humorous
    "n goes to zero” example. Ha ha!

    https://hacks.mozilla.org/2015/06/es6-in-depth-arrow-functions/

    and also suggested Turing-related lambda function investigations. Wow!

    Cheers!

    On Jun 21, 2016, at 9:36 PM, Juho Vepsäläinen notifications@github.com wrote:

    You mean

    export default () =>
    (
    <
    ul>{notes.map(note =>

  • {note.task}

  • )}</ul

    )

    right in the start? The curlies come from JSX. That's why I have those bullets right below the code example but I don't mind improving this. 👍

    Good point about deprecations. I can fix some of that but not everything. It all moves so fast in the Node world.


    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub, or mute the thread.

    @bebraw
    Copy link
    Member

    bebraw commented Jun 22, 2016

    By the way, I wrote a language feature appendix to cover these sort of questions. I probably should link there in the text.

    @ggirton
    Copy link
    Author

    ggirton commented Jun 22, 2016

    Yes, there were multiple references to it and, ha ha ha, finally I went there and started reading it :-) I don’t think you need to put in a link but mention “ This is an Arrow function explained in the appendix” … good to go :-)

    On Jun 21, 2016, at 9:57 PM, Juho Vepsäläinen notifications@github.com wrote:

    By the way, I wrote a language feature appendix to cover these sort of questions. I probably should link there in the text.


    You are receiving this because you authored the thread.
    Reply to this email directly, view it on GitHub, or mute the thread.

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

    No branches or pull requests

    2 participants