question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove support for "render" prop and only support "children"

See original GitHub issue

Right now we support both <Downshift render={() => <div />} /> and <Downshift>{() => <div />}</Downshift>. It’s kinda nice, but now that React has adopted the children version with the new context API it’d be good to just go with children for cohesion. In v2.0.0 we’ll drop support for the prop called render.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:14
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Abdul-Moiz-Ansaricommented, May 22, 2018

I would love to do it. Also suggest that we should add a nice informational message in console in case if there is a ‘render’ prop, just like React does in various cases.

0reactions
smelliotcommented, Jul 4, 2018

@blocka thanks, but I was merely trying to point out that there could be some confusion caused by this due to how broadly “prop” is used to describe things and that not everyone would know that it could refer to “function as a child” (this is only mentioned in one small paragraph in the article and there is no downshift documentation to say the “prop called render” which is demonstrated in the linked article is not supported)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove support for "render" prop and only support "children"
Right now we support both } /> and {() => } . It's kinda nice, but now that React has adopted the children...
Read more >
javascript - React - Remove prop from child - Stack Overflow
I just ran into this issue. You can just create a new element and use the old element's type and props you want...
Read more >
React Reference Guide: Render props - LogRocket Blog
An all-in-one reference guide on render props in React, including how to implement render props, how to implement HOCs, and more.
Read more >
The mystery of React Element, children, parents and re-renders
Looking into what is React Element, exploring various children vs parents relationship in React, and how they affect re-renders.
Read more >
A Complete Guide To props.children In React - codeburst
Essentially, props.children is a special prop, automatically passed to every component, that can be used to render the content included between the opening ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found