Should I store function references in Redux store? : <p>I'm trying to build <strong>keyboard shortcut support</strong> into my React/Redux app in an <strong>idiomatic React/Redux way</strong>. The way I am planning to do this is to have the following action creator and associated action:</p>

<pre><code>registerShortcut(keyCode, actionCreatorFuncReference)
</code></pre>

<p>The reducer would then update a registeredShortcuts object in the redux store with a mapping of keyCodes to actionCreatorFuncReferences. Then my root component would listen for keyup and see if there is an associated keyCode registered and if so, then dispatch the mapped action via the action creator function reference.</p>

<p>However, this would be the first time I am <strong>storing function references in my Redux store</strong>. To date I've only had objects with keys with vanilla values (strings, ints, etc).</p>

<p>The Redux docs says "You should do your best to keep the state serializable. Don’t put anything inside it that you can’t easily turn into JSON.". <strong>Does this suggest it's a bad idea to store such function references in my Redux store?</strong> If so, what is a better way to accomplish what I'm trying to do in React/Redux?</p>

<p>An alternative approach is just to store the mapping of keyCodes and function references in the root react component itself, but that didn't feel very Redux-like since now application state is not in the Redux store.</p>
