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

add recipe for custom queries + custom render #80

Closed
alexkrolick opened this issue Apr 14, 2019 · 8 comments
Closed

add recipe for custom queries + custom render #80

alexkrolick opened this issue Apr 14, 2019 · 8 comments
Labels
good first issue 🏁 Good for newcomers

Comments

@alexkrolick
Copy link
Collaborator

alexkrolick commented Apr 14, 2019

Add a recipe combining these 2 steps:

@alexkrolick alexkrolick added the good first issue 🏁 Good for newcomers label Apr 14, 2019
@bcarroll22
Copy link
Contributor

This would be very helpful.

I'll add this recipe to the native docs soon, and when I do I'll submit a version for DOM 👍

@bcarroll22
Copy link
Contributor

Still willing to do this, here's my struggle. This custom query in the page you linked is data-test-id, but that's included in the core now. Can you think of a good custom query as an example that isn't an implementation detail or an anti-pattern? If it's in the docs, you could assume folks are going to do it, and I don't want to steer anyone in the wrong direction.

@kentcdodds
Copy link
Member

Agreed. If it's a good query for anyone, it's probably a good query for everyone. If it's not a good query for everyone, then it's probably not a good query for anyone.

@bcarroll22
Copy link
Contributor

Make sense to me.

So should we not expose the utilities to build custom queries at all, or leave it and make it undocumented/unsupported/unofficial?

@kentcdodds
Copy link
Member

I'd be curious to hear from people who use the feature actually. I never use the feature so I'm maybe not a good candidate for making a decision here.

@alexkrolick
Copy link
Collaborator Author

I've used it for internationalization utils and I've seen other people trying to do that, too

@bcarroll22
Copy link
Contributor

Oh that's cool! Is it possible to show a short version of what that looks like?

@pmarcanol
Copy link

I would love to know if it's possible to pass props to the wrapper component, I couldn't find an example anywhere. This would make the feature way more useful since you could be able to pass a custom state to a redux wrapper for example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue 🏁 Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants