Is it alright to make conditional rendering inside of render function of <Route /> component of React-router? Kind of this:
<Route exact path="/form" render={props => (
this.props.dataLoaded && <Form {...props} />
)} />
The idea is ... I dont want to mount the Form component until some data in parent component are loaded.
I have that data in redux store, so basically I could access it inside of the child component. The problem is that I would have to check the changes and make some additional stuff in order to achieve what I need.
The conditional rendering seems to me as much simpler solution. I just havent seen it anywhere yet so Im not sure whether it is technically right solution.