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

Possibly 2.0 Candidate #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Possibly 2.0 Candidate #6

wants to merge 1 commit into from

Conversation

donavon
Copy link
Collaborator

@donavon donavon commented Jul 24, 2016

José,

Here's my proposal. We deprecate version 1.x and come out with a 2.0 with the following breaking changes:

  1. The GitHub repo is renamed to react-responsive-render-if.
  2. We publish to npm as react-responsive-render-if.
  3. The code willexport default, which is a more standard way of exporting React components.
  4. tag becomes masqueradeAs.
    1. It better describes what is really happening as the value can either be a tag name (string) or a React component (how cool is that?)
    2. Masquerade is such a cool word.
  5. In our examples, we use the suggested component name ResponsiveRenderIf (see README). We could go with simply RenderIf.

Oh, you originally wanted a notag option. I've made this unnecessary as I only render a containing element when any of the following are true:

  • There are multiple children.
  • A masqueradeAs prop was specified.
  • Additional props were passes other than query or masqueradeAs.

All this is up for discussion. It's your baby. I'll re-submit a proper PR once we've discussed.

Also, my intent is to publish the first version as "alpha" we we can play with it on codepen before we publish a "real" 2.0.0. This will save us the embarrassment in case we get anything wrong.

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

Successfully merging this pull request may close these issues.

None yet

1 participant