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)

    Sanjay Gupta on Joe Rogan: yes, I agree, they shouldn't have said horse dewormer; no, I don't know why they did; no, they shouldn't have done that;…

  • (no subject)

    To the future me: I keep returning in my mind to the simple idea in this talk about containing React component's logic in a custom hook and having a…

  • (no subject)

    I've been listening to The Boys produced by the Graphic Audio. Better than the film; more irreverent; the Butcher character is even more profane and…

  • 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