title: Reactjs: Pass same props to multiple components
body: <p>I'm kind of new to reactjs and I'm trying to do a bit of clean up. I was wondering how I could use spread attributes for props provided by the new context api? <code>&lt;Today /&gt;</code> and <code>&lt;All /&gt;</code> will basically use the same props and I thought it looked pretty messy.</p>
  
  <p>Here are the lines I wanted to clean up:</p>
  
  <pre><code>     &lt;ResultsProvider&gt;
          &lt;ResultsContext.Consumer&gt;
            {(val) =&gt; (
              &lt;Switch&gt;
                &lt;Route exact path={'/'} render={ (props) =&gt;
                    &lt;Today
                      results={val.results}
                      loading={val.loading}
                      viewTicket={val.viewTicket}
                      formatStatus={val.formatStatus}
                      fetchData={val.fetchData}
                      formatDate={val.formatDate}
                      sortResults={val.sortResults}
                      formatTitle={val.formatTitle}
                    /&gt;
                }/&gt;
                &lt;Route path={'/week'} component={Week} /&gt;
                &lt;Route path={'/all'} render={ (props) =&gt; 
                    &lt;All
                      results={val.results}
                      loading={val.loading}
                      viewTicket={val.viewTicket}
                      formatStatus={val.formatStatus}
                      fetchData={val.fetchData}
                      formatDate={val.formatDate}
                      sortResults={val.sortResults}
                      formatTitle={val.formatTitle}
                    /&gt;
                }/&gt;
              &lt;/Switch&gt;
            )}
          &lt;/ResultsContext.Consumer&gt;
        &lt;/ResultsProvider&gt;
  </code></pre>