title: Default arguments within a Redux action creator
body: <p>Are there any unwanted sideeffects of having default arguments to an <em>action creator</em>? Or even using <code>Object.assign</code> within an action creator?</p>
  
  <p>For example we have an action creator called <code>notify()</code> that creates notices in our store.</p>
  
  <p>Although we need default arguments to these notices, we have a seperate function called <code>createNotice</code> that takes care of this.</p>
  
  <p>Our action create looks like this:</p>
  
  <pre><code>export function notify(notification) {
    return {
      type: ADD,
      notification,
    };
  }
  </code></pre>
  
  <p>And our <code>createNotice</code> looks like this:</p>
  
  <pre><code>export function createNotice(title = '', message, level = 'info', settings = {}) {
    return merge({}, {
      title,
      message,
      key: (new Date).getTime(),
      action: 'Dismiss',
      dismissAfter: 5000,
      className: level,
    }, settings);
  }
  </code></pre>
  
  <p>I <em>really</em> dislike having to import <code>createNotice</code> and <code>notify</code> plus bind <code>notify</code> to dispatch for every component that uses it to do the following:</p>
  
  <pre><code>&lt;Button onClick={() =&gt; nofity(createNotice('Something Happened', 'I think it worked!'))} /&gt;
  </code></pre>
  
  <p>Id rather something like the following:</p>
  
  <pre><code>&lt;Button onClick={() =&gt; nofity('Something Happened', 'I think it worked!')} /&gt;
  </code></pre>
  
  <p>through having an action creator as such:</p>
  
  <pre><code>export function notify(notice) {
    return {
      type: ADD,
      createAction(notice),
    };
  }
  </code></pre>
  
  <p>But that feels like a redux anti-pattern to me?</p>