Skip to content

Commit

Permalink
remove dependency from google initialization hook (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErrorPro committed Apr 26, 2021
1 parent b98ab54 commit 1477ee2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
.DS_Store
/node_modules/
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function ReactGoogleAutocomplete(props) {
return function () {
return event.current ? event.current.remove() : undefined;
};
}, [types, options, fields, componentRestrictions, apiKey, onPlaceSelected, handleLoadScript, autocompleteRef, bounds]);
}, []);

return _react2.default.createElement("input", _extends({
ref: function ref(el) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-google-autocomplete",
"version": "2.0.2",
"version": "2.0.3",
"description": "React component for google autocomplete.",
"main": "index.js",
"types": "index.d.ts",
Expand Down
12 changes: 1 addition & 11 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,7 @@ function ReactGoogleAutocomplete(props) {
}

return () => (event.current ? event.current.remove() : undefined);
}, [
types,
options,
fields,
componentRestrictions,
apiKey,
onPlaceSelected,
handleLoadScript,
autocompleteRef,
bounds,
]);
}, []);

return (
<input
Expand Down

0 comments on commit 1477ee2

Please sign in to comment.