{"componentChunkName":"component---src-templates-blog-js","path":"/blog/2013/07/17/react-v0-4-0.html","result":{"data":{"markdownRemark":{"html":"<p>Over the past 2 months we’ve been taking feedback and working hard to make React even better. We fixed some bugs, made some under-the-hood improvements, and added several features that we think will improve the experience developing with React. Today we’re proud to announce the availability of React v0.4!</p>\n<p>This release could not have happened without the support of our growing community. Since launch day, the community has contributed blog posts, questions to the <a href=\"https://groups.google.com/group/reactjs\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google Group</a>, and issues and pull requests on GitHub. We’ve had contributions ranging from documentation improvements to major changes to React’s rendering. We’ve seen people integrate React into the tools they’re using and the products they’re building, and we’re all very excited to see what our budding community builds next!</p>\n<p>React v0.4 has some big changes. We’ve also restructured the documentation to better communicate how to use React. We’ve summarized the changes below and linked to documentation where we think it will be especially useful.</p>\n<p>When you’re ready, <a href=\"/docs/installation.html\">go download it</a>!</p>\n<h3 id=\"react\"><a href=\"#react\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React </h3>\n<ul>\n<li>Switch from using <code class=\"gatsby-code-text\">id</code> attribute to <code class=\"gatsby-code-text\">data-reactid</code> to track DOM nodes. This allows you to integrate with other JS and CSS libraries more easily.</li>\n<li>Support for more DOM elements and attributes (e.g., <code class=\"gatsby-code-text\">&lt;canvas&gt;</code>)</li>\n<li>Improved server-side rendering APIs. <code class=\"gatsby-code-text\">React.renderComponentToString(&lt;component&gt;, callback)</code> allows you to use React on the server and generate markup which can be sent down to the browser.</li>\n<li><code class=\"gatsby-code-text\">prop</code> improvements: validation and default values. <a href=\"/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html\">Read our blog post for details…</a></li>\n<li>Support for the <code class=\"gatsby-code-text\">key</code> prop, which allows for finer control over reconciliation. <a href=\"/docs/multiple-components.html\">Read the docs for details…</a></li>\n<li>Removed <code class=\"gatsby-code-text\">React.autoBind</code>. <a href=\"/blog/2013/07/02/react-v0-4-autobind-by-default.html\">Read our blog post for details…</a></li>\n<li>Improvements to forms. We’ve written wrappers around <code class=\"gatsby-code-text\">&lt;input&gt;</code>, <code class=\"gatsby-code-text\">&lt;textarea&gt;</code>, <code class=\"gatsby-code-text\">&lt;option&gt;</code>, and <code class=\"gatsby-code-text\">&lt;select&gt;</code> in order to standardize many inconsistencies in browser implementations. This includes support for <code class=\"gatsby-code-text\">defaultValue</code>, and improved implementation of the <code class=\"gatsby-code-text\">onChange</code> event, and circuit completion. <a href=\"/docs/forms.html\">Read the docs for details…</a></li>\n<li>We’ve implemented an improved synthetic event system that conforms to the W3C spec.</li>\n<li>Updates to your component are batched now, which may result in a significantly faster re-render of components. <code class=\"gatsby-code-text\">this.setState</code> now takes an optional callback as its second parameter. If you were using <code class=\"gatsby-code-text\">onClick={this.setState.bind(this, state)}</code> previously, you’ll want to make sure you add a third parameter so that the event is not treated as the callback.</li>\n</ul>\n<h3 id=\"jsx\"><a href=\"#jsx\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>JSX </h3>\n<ul>\n<li>Support for comment nodes <code class=\"gatsby-code-text\">&lt;div&gt;{/* this is a comment and won&#39;t be rendered */}&lt;/div&gt;</code></li>\n<li>Children are now transformed directly into arguments instead of being wrapped in an array\nE.g. <code class=\"gatsby-code-text\">&lt;div&gt;&lt;Component1/&gt;&lt;Component2/&gt;&lt;/div&gt;</code> is transformed into <code class=\"gatsby-code-text\">React.DOM.div(null, Component1(null), Component2(null))</code>.\nPreviously this would be transformed into <code class=\"gatsby-code-text\">React.DOM.div(null, [Component1(null), Component2(null)])</code>.\nIf you were using React without JSX previously, your code should still work.</li>\n</ul>\n<h3 id=\"react-tools\"><a href=\"#react-tools\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>react-tools </h3>\n<ul>\n<li>Fixed a number of bugs when transforming directories</li>\n<li>No longer re-write <code class=\"gatsby-code-text\">require()</code>s to be relative unless specified</li>\n</ul>","excerpt":"Over the past 2 months we’ve been taking feedback and working hard to make React even better. We fixed some bugs, made some under-the-hood improvements, and added several features that we think will improve the experience developing with React. Today we’re proud to announce the availability of React v0.4! This release could not have happened without the support of our growing community. Since launch day, the community has contributed blog posts, questions to the Google Group, and issues and pull…","frontmatter":{"title":"React v0.4.0","next":null,"prev":null,"author":[{"frontmatter":{"name":"Paul O’Shannessy","url":"https://twitter.com/zpao"}}]},"fields":{"date":"July 17, 2013","path":"content/blog/2013-07-17-react-v0-4-0.md","slug":"/blog/2013/07/17/react-v0-4-0.html"}},"allMarkdownRemark":{"edges":[{"node":{"frontmatter":{"title":"Introducing the New JSX Transform"},"fields":{"slug":"/blog/2020/09/22/introducing-the-new-jsx-transform.html"}}},{"node":{"frontmatter":{"title":"React v17.0 Release Candidate: No New Features"},"fields":{"slug":"/blog/2020/08/10/react-v17-rc.html"}}},{"node":{"frontmatter":{"title":"React v16.13.0"},"fields":{"slug":"/blog/2020/02/26/react-v16.13.0.html"}}},{"node":{"frontmatter":{"title":"Building Great User Experiences with Concurrent Mode and Suspense"},"fields":{"slug":"/blog/2019/11/06/building-great-user-experiences-with-concurrent-mode-and-suspense.html"}}},{"node":{"frontmatter":{"title":"Preparing for the Future with React Prereleases"},"fields":{"slug":"/blog/2019/10/22/react-release-channels.html"}}},{"node":{"frontmatter":{"title":"Introducing the New React DevTools"},"fields":{"slug":"/blog/2019/08/15/new-react-devtools.html"}}},{"node":{"frontmatter":{"title":"React v16.9.0 and the Roadmap Update"},"fields":{"slug":"/blog/2019/08/08/react-v16.9.0.html"}}},{"node":{"frontmatter":{"title":"Is React Translated Yet? ¡Sí! Sim! はい！"},"fields":{"slug":"/blog/2019/02/23/is-react-translated-yet.html"}}},{"node":{"frontmatter":{"title":"React v16.8: The One With Hooks"},"fields":{"slug":"/blog/2019/02/06/react-v16.8.0.html"}}},{"node":{"frontmatter":{"title":"React v16.7: No, This Is Not the One With Hooks"},"fields":{"slug":"/blog/2018/12/19/react-v-16-7.html"}}}]}},"pageContext":{"slug":"/blog/2013/07/17/react-v0-4-0.html"}},"staticQueryHashes":[]}