-
Notifications
You must be signed in to change notification settings - Fork 115
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
Start rewriting docs towards queries
#119
Start rewriting docs towards queries
#119
Conversation
Good question, didn't even think about this actually 🤔. Now that you mention it, the same goes for the |
Maybe my two cents on the topic will help a little as I am responsible for the First of all, I tried to preserve the previous behaviour of the render method as much as possible following the discussion in #69
This was the "biggest" change in the PR in my opinion. With You also can have a case where none of them will match at the same time ever (imagine mixing Hope this clarifies the decision behind Now, with this approach, there is still an issue. If we are rendering children for
Per an initial comment in the issue #69 (comment) @mjackson suggested "to release a 2.x that removes the Hope that helps! |
Yeah, I'm aware of this, and when I first read it, I thought it made a lot of sense. However, I came to realize that - at least for my own code bases - this would require quite a lot of refactoring if I'd want to upgrade to v2, without really getting any benefit since most of the time I'm only specifying a single query. I would actually expect the single-query case to be the most common one, by a significant margin. So given both the smooth transition path, as well as a convenience API for the single-query case, I thought it'd be worth it to consider leaving the |
Meaning we'd need a PR against the work in #72 to preserve that behavior, yeah? |
@tstirrat15 Yeah, that's right |
I've been seeing [this comment](ReactTraining#70 (comment)) circulate recently, which is incorrect. react-responsive supports render functions just fine ([documented here](https://github.com/contra/react-responsive#rendering-with-a-child-function)). This behavior was added in 2016 via [this PR](yocontra/react-responsive#64) so it isn't a recent addition. Not trying to be a jerk here - I don't really care which module people use, but please don't spread misinformation as it just confuses people. Thanks.
Remove incorrect react-responsive comparison
I've just merged #123 into |
… reinstate renderprops explanation for queyr
@edorivai have another look. I added a section to Basic Usage with |
👍 Love it! |
Fixes #118
Motivation
This is one of the tasks before a v2 master release.
Discussion
queries
plus child components (i.e. not a child function, but rather child JSX)? Must all queries match, or is it at least one query matches? This bit seems to indicate that it'ssome
as opposed toevery
.query
will exist alongsidequeries