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

Update GoogleMapLoader.js #252

Merged
merged 1 commit into from
May 29, 2016
Merged

Update GoogleMapLoader.js #252

merged 1 commit into from
May 29, 2016

Conversation

sars
Copy link
Contributor

@sars sars commented May 9, 2016

There are some cases when ref callback returns null
it leads to error : "Uncaught TypeError: Cannot read property 'offsetWidth' of null"

quote from react doc:

Note that when the referenced component is unmounted and whenever the ref changes, the old ref will be called with null as an argument. This prevents memory leaks in the case that the instance is stored, as in the first example. Also note that when writing refs with inline function expressions as in the examples here, React sees a different function object each time so on every update, ref will be called with null immediately before it's called with the component instance.

https://facebook.github.io/react/docs/more-about-refs.html

There are some cases when ref callback returns null
it leads to error : "Uncaught TypeError: Cannot read property 'offsetWidth' of null"

quote from react doc:
> Note that when the referenced component is unmounted and whenever the ref changes, the old ref will be called with null as an argument. This prevents memory leaks in the case that the instance is stored, as in the first example. Also note that when writing refs with inline function expressions as in the examples here, React sees a different function object each time so on every update, ref will be called with null immediately before it's called with the component instance.

https://facebook.github.io/react/docs/more-about-refs.html
@tomchentw tomchentw merged commit 334c5c9 into tomchentw:master May 29, 2016
@tomchentw
Copy link
Owner

Published v4.10.3. Thanks @sars !

We're also looking for maintainers. Involve in #266 to help strengthen our community!

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