-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
hi, first of all I'm big fan of you.
i have little idea in this library
AS-IS
to access map instance, we can use useMapContext
but because of Provider is inside of Map component, map instance is accessible only from child components with the map component as a parent.
const InnerMap = () => {
const map = useMapContext()
return (
...
)
}
const NaverMap = () => {
return (
<Map
<InnerMap />
</Map>
)
}TO-BE
how about change usage of useMapContext like this?
index.tsx
<MapContextProvider>
<App />
</MapContextProvider>
App.tsx
function App() {
const map = useMapContext();
return (
<Map />
);
}i'll make pr if you ok.
josworks27josworks27josworks27
Metadata
Metadata
Assignees
Labels
No labels