title: How does this code work with reactJs
body: <p>I have the following code:</p>
  
  <pre><code>import React from 'react'
  import Header from '../../components/Header'
  
  export const CoreLayout = ({ children }) =&gt; (
     &lt;div&gt;test&lt;/test&gt;
  )
  
  CoreLayout.propTypes = {
  
  }
  
  export default CoreLayout
  </code></pre>
  
  <p>But I don't understand how this is picking that is react. I'm used to:</p>
  
  <pre><code>import React from 'react';
  const Contacts = React.createClass({
     render() {
       return (
         &lt;div&gt;&lt;/div&gt;
      );
     }
  });
  export default Contacts;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>import React from 'react';
  class Contacts extends React.Component {
    constructor(props) {
      super(props);
    }
    render() {
      return (
        &lt;div&gt;&lt;/div&gt;
      );
    }
  }
  export default Contacts;
  </code></pre>
  
  <p>How can I add functions in the coded I showed above? Like functions to add logic in the template an things like that.</p>