react-google-maps
Advanced tools
Comparing version 4.8.1 to 4.8.2
@@ -0,1 +1,11 @@ | ||
<a name="4.8.2"></a> | ||
## [4.8.2](https://github.com/tomchentw/react-google-maps/compare/v4.8.1...v4.8.2) (2016-02-21) | ||
### Bug Fixes | ||
* **componentLifecycleDecorator:** check _unregisterEvents before calling ([cd2667c](https://github.com/tomchentw/react-google-maps/commit/cd2667c)), closes [#117](https://github.com/tomchentw/react-google-maps/issues/117) | ||
<a name="4.8.1"></a> | ||
@@ -2,0 +12,0 @@ ## [4.8.1](https://github.com/tomchentw/react-google-maps/compare/v4.8.0...v4.8.1) (2016-02-20) |
@@ -20,4 +20,6 @@ "use strict"; | ||
function unregister() { | ||
this._unregisterEvents(); | ||
this._unregisterEvents = null; | ||
if (this._unregisterEvents) { | ||
this._unregisterEvents(); | ||
this._unregisterEvents = null; | ||
} | ||
} | ||
@@ -24,0 +26,0 @@ |
{ | ||
"__template__gist__": "https://gist.github.com/tomchentw/368a93bb748ad9d576f1#file-package-json", | ||
"name": "react-google-maps", | ||
"version": "4.8.1", | ||
"version": "4.8.2", | ||
"description": "React.js Google Maps integration component", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
@@ -52,9 +52,9 @@ # react-google-maps | ||
Define `<GoogleMap>` component in the top level. Use `containerProps`, `containerTagName` to customized the wrapper DOM for the component. | ||
Define `<GoogleMap>` component in the top level. Use `containerProps`, `containerTagName` to customize the wrapper DOM for the component. | ||
Other components like `<Marker>` belongs to the children of `<GoogleMap>`. You already know this from the example code above. | ||
Other components like `<Marker>` belong to the children of `<GoogleMap>`. You already know this from the example code above. | ||
### Rule 2 | ||
Everything in the `Methods` table in the [official documentation](https://developers.google.com/maps/documentation/javascript/3.exp/reference#Marker) of the component could be set via component's *props* directly. For example, a `<Marker>` component has the following *props*: | ||
Everything in the `Methods` table in the [official documentation](https://developers.google.com/maps/documentation/javascript/3.exp/reference#Marker) of the component could be set directly via component's *props* . For example, a `<Marker>` component has the following *props*: | ||
@@ -71,7 +71,7 @@ ``` | ||
Anything that are inside components' `options` property could __ONLY__ be accessible via `props.options`. It's your responsibility to manage `props.options` object during the React lifetime for your component. My suggestion is, always use __Rule 3__ if possible. Only use `options` when it's necessary. | ||
Anything that is inside components' `options` property can __ONLY__ be accessible via `props.options`. It's your responsibility to manage the `props.options` object during the React lifetime of your component. My suggestion is, always use __Rule 3__ if possible. Only use `options` when it's necessary. | ||
### Rule 5 | ||
For event handlers on these components, you could bind them using React component convention. There's a list of event names exists in `eventLists` folder. Find the supported event name and use the form of `on${ camelizedEventName }`. For example, If I want to add `center_changed` callback to a map instance, I'll do the following with `react-google-maps`: | ||
Event handlers on these components can be bound using React component convention. There's a list of event names that exist in the `eventLists` folder. Find the supported event name and use the form of `on${ camelizedEventName }`. For example, If I want to add `center_changed` callback to a map instance, I'll do the following with `react-google-maps`: | ||
@@ -78,0 +78,0 @@ ```js |
@@ -13,4 +13,6 @@ export default function componentLifecycleDecorator({ registerEvents, instanceMethodName, updaters }) { | ||
function unregister() { | ||
this._unregisterEvents(); | ||
this._unregisterEvents = null; | ||
if (this._unregisterEvents) { | ||
this._unregisterEvents(); | ||
this._unregisterEvents = null; | ||
} | ||
} | ||
@@ -17,0 +19,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
372757
7089