Skip to content

Conversation

@donavon
Copy link
Collaborator

@donavon donavon commented Jun 16, 2016

Currently a user must do this:

import { ResponsiveComponent } from 'react-responsive-component';

But most components import like this (i.e. no curly brackets):

import ResponsiveComponent from 'react-responsive-component';

Allow support for both, while warning the the old way is deprecated.

src/index.js Outdated
constructor(props) {
super(props);
console.warn( //eslint-disable-line no-console
"The following format is depricated:\n" +
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Deprecated'

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh!

@jfkhoury
Copy link
Owner

Minor comment, otherwise 👍

src/index.js Outdated
import ResponsiveComponentDefault from "./ui/ResponsiveComponent";

export { ResponsiveComponent };
export class ResponsiveComponent extends ResponsiveComponentDefault {
Copy link
Collaborator Author

@donavon donavon Jun 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jfkhoury, Theres also an "extra" export here. I'll remove it and keep it at the bottom.

@donavon donavon force-pushed the feature/dw/default branch from a39d8a3 to 31c1982 Compare June 16, 2016 15:52
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