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

Warning: owner-based and parent-based contexts differ #116

Closed
ilionic opened this issue Sep 21, 2015 · 6 comments
Closed

Warning: owner-based and parent-based contexts differ #116

ilionic opened this issue Sep 21, 2015 · 6 comments

Comments

@ilionic
Copy link

ilionic commented Sep 21, 2015

Getting this warning while trying to insert another React component into <InfoWindow>, in my case React-router Link

        <InfoWindow key={`${ref}_info_window`}
          onCloseclick={() => this.handleMarkerClick(marker, false)}>
          <div>
            <Link params={{id: marker.id}} to={'details'}>
              <img src={marker.thumb} />
            </Link>
            <p><strong>{marker.name}</strong><br/>
          </div>
        </InfoWindow>
@tomchentw
Copy link
Owner

Internally InfoWindow will render your content in another React.render call. Not sure how to deal with that...

@ilionic
Copy link
Author

ilionic commented Sep 22, 2015

As alternative to InfoWindow I am trying to play around with InfoBox to see if it gives warning.
Though having issue with importing InfoBox component from /addons

I am using Webpack and loading components this way:
import {GoogleMap, Marker, InfoWindow} from 'react-google-maps'; - works fine.

import {InfoBox} from 'react-google-maps/addons/'; - module not found
Relative path to npm-modules isn't best way for me, like in examples.
Any tips? Thanks

@tomchentw
Copy link
Owner

import InfoBox from 'react-google-maps/lib/addons/InfoBox';

@ilionic
Copy link
Author

ilionic commented Sep 22, 2015

Thank you! Unfortunately warning is still present.
Checked around and apparently this is context issue and should be resolved in React 0.14

@tomchentw
Copy link
Owner

Ref #109

tomchentw added a commit that referenced this issue Oct 8, 2015
* Closes #127, #102
* Ref #116

BREAKING CHANGE
* __React@^0.14__: upgrade React in peerDependencies
	* add __react-dom@^0.14__ to peerDependencies
@tomchentw
Copy link
Owner

Close this for #129

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

2 participants