Skip to content

Commit 06b56e1

Browse files
Merge pull request #50 from devesmee/fix/default-props
Fixed default props error / warning
2 parents 345f369 + a577c81 commit 06b56e1

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/LeafletView/index.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@ export type LeafletViewProps = {
5454
};
5555

5656
const LeafletView: React.FC<LeafletViewProps> = ({
57-
renderLoading,
57+
renderLoading = (() => <LoadingIndicator />),
5858
onError,
5959
onLoadEnd,
6060
onLoadStart,
6161
onMessageReceived,
62-
mapLayers,
62+
mapLayers = DEFAULT_MAP_LAYERS,
6363
mapMarkers,
6464
mapShapes,
6565
mapCenterPosition,
6666
ownPositionMarker,
67-
zoom,
68-
doDebug,
67+
zoom = DEFAULT_ZOOM,
68+
doDebug = __DEV__,
6969
androidHardwareAccelerationDisabled,
7070
webviewStyle,
7171
injectedJavaScript
@@ -228,13 +228,6 @@ const LeafletView: React.FC<LeafletViewProps> = ({
228228
);
229229
};
230230

231-
LeafletView.defaultProps = {
232-
renderLoading: () => <LoadingIndicator />,
233-
mapLayers: DEFAULT_MAP_LAYERS,
234-
zoom: DEFAULT_ZOOM,
235-
doDebug: __DEV__,
236-
};
237-
238231
const styles = StyleSheet.create({
239232
container: {
240233
flex: 1,

0 commit comments

Comments
 (0)