When i am trying to display map in mobile view i see broken map:
https://stackoverflow.com/a/36257493/13739566 - in this link is description why it doesn't work but use 'invalidSize()' doesn't work in my case (or maybe i use it wrong).It's my code:
import React from 'react';
import { IonContent, IonApp, IonHeader} from '@ionic/react';
import { Map as Maps, Marker, Popup, TileLayer, } from 'react-leaflet'
import 'leaflet/dist/leaflet.css'
import './MainTab.css';
const MainTab: React.FC = () => {
return (
<IonApp>
<IonContent>
<IonHeader>Header</IonHeader>
<Maps center={position} zoom={13} keyboard={0} >
<TileLayer
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<Marker position={position}>
<Popup>Kliknij aby przejść do googla: </Popup>
</Marker>
</Maps>
</IonContent>
</IonApp>
);
};
export default MainTab;