Good day.
I am writing an application React + Redux . My component looks like this:
import React from 'react'; class HeaderContainer extends React.Component { onGetBtnClick(e) { this.props.loadPresentations() } render() { console.log(this.props); return ( <div> <h1>Header</h1> <button className='btn' onClick={this.onGetBtnClick}>loadPresentations</button> </div> ); } } export default HeaderContainer; In this case, the browser log displays:
Object {user: Object, loadPresentations: function} Those. the loadPresentations function is there. And I can not call her. Writes
Uncaught TypeError: Cannot read property 'props' of null.
But user can.
Can you please tell me how to call Action ?