Reactjs redux store state on page refresh. componentWillUnmount not working
<p>I have a component like:</p>

<pre><code>import React, { PropTypes, Component } from 'react'


class MyView extends Component {

    render() {

        return (
            &lt;div&gt;
                Something
            &lt;/div&gt;
        )
    }
    componentWillUnmount() {
        console.log("Hellooww world")
        actions.store_state() 
    }

}

export default MyView
</code></pre>

<p>Here when I refresh the page I want to call <code>actions.store_state()</code> funciton.</p>

<p>But when I refresh the page <code>componentWillUnmount()</code> is not called. How can I call any function or store the state to localStorage when page is refreshed.</p>