Comments (9)
Looks like unstable_renderSubtreeIntoContainer
should solve any context problems, as like as here https://github.com/bvaughn/react-virtualized/search?utf8=%E2%9C%93&q=unstable_renderSubtreeIntoContainer
from google-map-react.
In 0.16v
from google-map-react.
any reason - why not
:-)
- Even in simple React components, parent of component and it's owner can be different.
- Here the other case - to reuse some gmap ability I render React component inside Dom Node created and attached to Dom Tree by google maps api. The same trick you could see in many React components like modals, etc...
from google-map-react.
@istarkov thanks. I guess a better question would be - is this necessary?
reason I'm asking is because packages like react-intl provide a high order component that wraps around the root to provide shared functionality down the component tree.
from google-map-react.
Is this necessary? - Yes
I understand your issue, all this components like react-intl
uses context to pass data into component tree.
And before React 0.14 all was fine because context was passed over owner not parents, so GoogleMap
childs was able to use it.
Now looks like that it's not.
This is a good issue.
from google-map-react.
BTW context is experimental feature, and I have a little knowledge about how it works,
I know that there are a lot of issues with context - like how to rerender children if something in context has changed.
So any help on this will be appreciated.
from google-map-react.
@istarkov will try to get a PR in to fix this. thanks for all the hard work on this package. saved me a bunch of headaches.
from google-map-react.
Any news on this issue ? I am facing the same problem trying to use react-intl's formattedMessage in a marker. Is there any known workaround ?
from google-map-react.
For now I ended up wrapping our markers with their own IntlProvider, with the same settings as the one in the Root element. This works fine, but feels a bit dirty and problematic for maintenance.
from google-map-react.
Related Issues (20)
- googleMaps not server-side rendered on next.js HOT 3
- How to render default google maps markers with this library.
- Sponsored issue: How to render default google maps markers with this library.
- shortest distance from a polygon to some point on map
- map.getProjection(...).fromContainerPixelToLatLng is not a function HOT 4
- Google map suddenly stopped loading, white screen appears. HOT 1
- Map Pins are not positioned correctly after zoom or pan HOT 12
- Fitbounds and directionService is not updating markers on the map HOT 1
- Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'm.nB')
- Card with address on upper left corner
- drag the map when we hover on div card outside the map and it show the that particular marker if marker is hide on centre coardinates HOT 1
- Google together with Visgl and OpenJS has released the official react components for Google maps HOT 4
- need to detect getVisible StreetViewService
- AdvancedMarkerElement HOT 2
- Creating a map marker with visgl library
- React.StrictMode throws warning because of findDOMNode use
- React 18 StrictMode: Markers incorrectly positioned HOT 2
- Error: ENOENT: no such file or directory, open @googlemaps\src\index.ts
- Marker not showing, using React 18 HOT 2
- Trouble Implementing Content Security Policy (CSP) with Google Maps and Google Tag Manager in React Project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-map-react.