Prop always null in react
<p>I have a component which has to display the object details. This is instantiated from a TableComponent on click of a row.
The object id is passed:</p>

<pre><code>&lt;ObjectDetails objectID = {id}/&gt;
</code></pre>

<p>This is my ObjectDetails component:</p>

<pre><code>class ObjectDetails extends Component {

componentWillMount() {
    this.props.dispatch(loadObjectDetails(this.props.objectID));
}

render() {
    console.log("props------" + JSON.stringify(this.props));
    ....
}

let select = (state) =&gt; ({objectDetails: state.objectDetails});

export default connect(select)(ObjectDetails);

}
</code></pre>

<p><code>loadObjectDetails</code> populates the store with objectDetails. I can see that the store does have the details. 
But in <code>render()</code>, props always has objectDetails as null.</p>

<p>Not sure what I'm doing wrong, any help please?</p>

<p>Edit:
Adding few more details</p>

<pre><code>export function loadObjectDetails(objectID) {
return function (dispatch) {
Rest.get('/rest/objects/' + objectID).end(
  (err, res) =&gt; {
    if(err) {
      dispatch({ type: 'FETCH_OBJECT_DETAILS_FAILURE', error: res.body})
    } else {
      dispatch({ type: 'FETCH_OBJECT_DETAILS_SUCCESS', objectDetails: res.body})
          }
     }
   )
  }
}

export default function objectDetailsReducer(state={
  objectDetails: null,
  error: null,
}, action) {

switch (action.type) {
case "FETCH_OBJECT_DETAILS_SUCCESS": {
  return {...state, objectDetails: action.objectDetails, error: null}
}
case "FETCH_OBJECT_DETAILS_FAILURE": {
  return {...state, error: action.error }
}
}
return state
}

const middleware = applyMiddleware(promise(), thunk, logger())

export default compose(middleware)(createStore)(combineReducers({ reducer1, reducer2, objectDetailsReducer}))
</code></pre>