Andrey (azangru) wrote,
Andrey
azangru

I am so annoyed when React people use the term "render prop" to refer to this method:

<Foo>
{ (thingy) => <Bar something={thingy}/>}
</Foo>
.

As Ryan Florence or even his holiness Dan did during this ReactConf:



It makes no sense. The original "render prop" is a prop, called "render" and used to bypass the normal component’s way of rendering by passing to it a function that it will use instead during rendering. Even React's docs still adhere to this conventional meaning by showing this prototypical example of a render prop:



The other one used to be called the "function as child" pattern. But now all the cool kids call it the render prop :-(

[Another rant]
(as an aside: you miserable LJ and your crappy editor that constantly is breaking my bit of JSX! why aren't you allowing raw code in pre tags any longer, you bastard?)
Subscribe

  • (no subject)

    Course description: In today's business world there are massive goals around diversity and inclusion and you are empowered to lead the way as…

  • Via Reddit

    I didn't know what the operation game was, so I looked it up. The guy, indeed, is clearly awake: I only learnt about charlie horse from King's…

  • (no subject)

    Listened to a talk from YCombinator's Startup School 2013: The tone of the talk is very different from the the tone that's typically employed…

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments