I am trying to migrate to recompose, but I am a little confused:
I usually write some code in beginning of render() method, for example checking values, settings styles,...
If I use recompose
where can I write these codes?
For example this :
render() {
const { classes } = this.props;
var startPos;
if (this.props.isGeolocationAvailable && this.props.isGeolocationEnabled && this.props.coords != undefined) {
console.log("location : " + this.props.coords.longitude + ":" + this.props.coords.latitude)
this.state.initial_location = this.props.coords;
}
else {
this.state.initial_location = { longitude: 0, latitude: 0 };
}
...