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

feat(async/ScriptjsLoader): rename from async/ScriptjsGoogleMap #150

Merged
merged 2 commits into from
Nov 21, 2015

Conversation

tomchentw
Copy link
Owner

This is a rewrite based on issue of #145 . Could @mattjstar please help review this? Thanks!

@tomchentw tomchentw force-pushed the refactor-145 branch 2 times, most recently from 08773e9 to b903afe Compare November 19, 2015 09:26
* Mark async/ScriptjsGoogleMap as deprecated
* Closes #145
* Ref #92

BREAKING CHANGE: migrate from async/ScriptjsGoogleMap to async/ScriptjsLoader and changed its behavior from implicit inheritance to simple delegation

To migrate the code follow the example below (extracted from examples/gh-pages migration):

Before:

```js
<ScriptjsLoader
  hostname={"maps.googleapis.com"}
  pathname={"/maps/api/js"}
  query={{v: `3.exp`, libraries: "geometry,drawing,places"}}
  //
  // <GoogleMap> props
  defaultZoom={3}
  defaultCenter={{lat: -25.363882, lng: 131.044922}}
  onClick={::this._handle_map_click}
/>
```

After:

```js
<ScriptjsLoader
  hostname={"maps.googleapis.com"}
  pathname={"/maps/api/js"}
  query={{v: `3.exp`, libraries: "geometry,drawing,places"}}
  //
  googleMapElement={
    <GoogleMap
      defaultZoom={3}
      defaultCenter={{lat: -25.363882, lng: 131.044922}}
      onClick={::this._handle_map_click}
    />
  }
/>
```
@tomchentw tomchentw merged commit a80a25f into master Nov 21, 2015
@tomchentw tomchentw deleted the refactor-145 branch November 21, 2015 02:46
@tomchentw
Copy link
Owner Author

Released v4.5.0

@mattjstar
Copy link

Awesome, looks great thanks so much @tomchentw !

@tomchentw
Copy link
Owner Author

Thanks for the inspiration from @mattjstar. I also update the synchronous version to a loader approach in #157. Make sure to check it out for latest update of async API as well.

@mattjstar
Copy link

perfect, thanks for handling the change so quick!

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.

3 participants