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

Align render functions #82

Closed
thebuilder opened this issue Jun 19, 2018 · 2 comments
Closed

Align render functions #82

thebuilder opened this issue Jun 19, 2018 · 2 comments

Comments

@thebuilder
Copy link
Owner

The next major release will align the children and render method, so they both require a ref.
Right now it's confusing if why one is different, and it's hard to remember when using the lib.

It'll still support rendering a React.Node as the children when using the onChange method.

@thebuilder
Copy link
Owner Author

Looking at Downshift 2.0 dropping render i think i'll do the same for react-intersection-observer. Nice and simple.
Version 6.0.0 will mark render as deprecated and log a warning, but still accept it.

Up until downshift 2.0.0, we had two props that could be used for your render prop: render and children. Then React released the official context API which uses render props and they called it children. In an effort to develop consistency throughout the ecosystem, we’ve dropped the prop called render and now only support children.
https://blog.kentcdodds.com/downshift-2-released-26b49589e8d2

@thebuilder
Copy link
Owner Author

Resolved in #88

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

1 participant