Git Product home page Git Product logo

Comments (9)

istarkov avatar istarkov commented on July 22, 2024 1

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.

istarkov avatar istarkov commented on July 22, 2024 1

In 0.16v

from google-map-react.

istarkov avatar istarkov commented on July 22, 2024

any reason - why not :-)

  1. Even in simple React components, parent of component and it's owner can be different.
  2. 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.

frankleng avatar frankleng commented on July 22, 2024

@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.

istarkov avatar istarkov commented on July 22, 2024

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.

istarkov avatar istarkov commented on July 22, 2024

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.

frankleng avatar frankleng commented on July 22, 2024

@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.

mlarcher avatar mlarcher commented on July 22, 2024

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.

mlarcher avatar mlarcher commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.