How to dispatch an action when clicking on Link when using React-Router & Redux?
<p>Let's say I have a <code>Link</code> that sends me to a page for adding/editing a list entry.</p>

<p>How do I dispatch a Redux action when I click on the <code>Link</code> itself  so that I can update the Redux store first, before actually getting redirected to that page.</p>

<p>Eg:
I click on Edit button -> Action is dispatched -> Store updated, <code>{'state': 'edit-mode'}</code> -> Proceed to redirect.</p>

<p>Or do you have another way in mind to accomplish what I'm trying to do?</p>

<p>Maybe when component has mounted, then I will run an action like <code>stateToEdit</code> based on certain conditions? If so, then please show to me your way. Thanks</p>

<p>PS: I'm using only one component for all add/edit/delete. So I'm thinking of a way to render based on the <code>state</code> whether its on <code>edit-mode</code> or <code>delete-mode</code> etc.</p>