× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Stateless functional components with react

Kiran
Feb 28, 2016
<p>You might be familiar with writing react components with React.createClass or extending React.Component in es6. In React 0.14, new syntax for writing stateless components was introduced. You can just write components as functions that takes props as argument and return jsx</p> <pre><code class="language-javascript">let Profile =&gt; (props) { return &lt;div&gt;{props.name}&lt;/div&gt;; } </code></pre> <p>These functional components are stateless and don't have life cycle methods. This pattern encourages us to create lots of pure react components and compose them to build larger components</p> <p> </p>

Get New Tutorials Delivered to Your Inbox

New tutorials will be sent to your Inbox once a week.

comments powered by Disqus