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

Map is a global object in ES6 #30

Closed
wuct opened this issue Apr 24, 2015 · 5 comments
Closed

Map is a global object in ES6 #30

wuct opened this issue Apr 24, 2015 · 5 comments

Comments

@wuct
Copy link
Collaborator

wuct commented Apr 24, 2015

Since Map is a global object in ES6, redefining it to a React class may have some side effects.

@frodosamoa
Copy link

When you initially get the component from the module, you can do something as follows:

var {GoogleMapsMixin, Map: GoogleMap} = require("react-google-maps");

So that from now on the component's name has been renamed to GoogleMap as opposed to Map. And then JSHint won't complain about a redeclaration of Map, or other side effects.

@wuct
Copy link
Collaborator Author

wuct commented Apr 25, 2015

@frodosamoa Thanks, I know I can rename it when I use it. But as long as I want to modify or contribute to this repo, I do not believe use the word "Map" is a good solution.

@tomchentw
Copy link
Owner

Thanks @wuct and @frodosamoa. I would appreciate a better naming for Map, maybe, MapContainer?

@frodosamoa
Copy link

I personally like GoogleMap. MapContainer isn't bad either!

@tomchentw
Copy link
Owner

Released v1.0.0 and closed this now.

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

No branches or pull requests

3 participants