The React-Leaflet documentation specifies that certain dynamic properties can be set via props. However, there are many other Leaflet properties/methods that are customizable...the caveat being that in order to access them, you need to interact with the Leaflet instance directly (mentioned here in the React-Leaflet docs).
I have not been able to find any examples of how to properly do this, but I did manage to get it to work:
class SimpleExample extends React.Component {
...
componentDidMount(){
this.L.doubleClickZoom.disable();
this.L.zoomControl.setPosition('topright');
}
render() {
return <Map ref={(ref) => this.L = ref.getLeafletElement()} />
}
}
Is this the best way to do this?