Skip to content

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.

@donavon donavon force-pushed the feature/dw/version-2 branch from fc553e3 to 9a226dc Compare July 24, 2016 11:37
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.

2 participants