diff --git a/content/blog/2013-06-05-why-react.md b/content/blog/2013-06-05-why-react.md index 30d54b24..6c23552a 100644 --- a/content/blog/2013-06-05-why-react.md +++ b/content/blog/2013-06-05-why-react.md @@ -6,13 +6,13 @@ author: [petehunt] There are a lot of JavaScript MVC frameworks out there. Why did we build React and why would you want to use it? -## React isn't an MVC framework. +## React isn't an MVC framework. {#react-isnt-an-mvc-framework} React is a library for building composable user interfaces. It encourages the creation of reusable UI components which present data that changes over time. -## React doesn't use templates. +## React doesn't use templates. {#react-doesnt-use-templates} Traditionally, web application UIs are built using templates or HTML directives. These templates dictate the full set of abstractions that you are allowed to use @@ -33,7 +33,7 @@ to render views, which we see as an advantage over templates for a few reasons: We've also created [JSX](/docs/jsx-in-depth.html), an optional syntax extension, in case you prefer the readability of HTML to raw JavaScript. -## Reactive updates are dead simple. +## Reactive updates are dead simple. {#reactive-updates-are-dead-simple} React really shines when your data changes over time. @@ -63,7 +63,7 @@ Because this re-render is so fast (around 1ms for TodoMVC), the developer doesn't need to explicitly specify data bindings. We've found this approach makes it easier to build apps. -## HTML is just the beginning. +## HTML is just the beginning. {#html-is-just-the-beginning} Because React has its own lightweight representation of the document, we can do some pretty cool things with it: diff --git a/content/blog/2013-06-12-community-roundup.md b/content/blog/2013-06-12-community-roundup.md index c8d4af25..ff7103e8 100644 --- a/content/blog/2013-06-12-community-roundup.md +++ b/content/blog/2013-06-12-community-roundup.md @@ -5,7 +5,7 @@ author: [vjeux] React was open sourced two weeks ago and it's time for a little round-up of what has been going on. -## Khan Academy Question Editor +## Khan Academy Question Editor {#khan-academy-question-editor} It looks like [Sophie Alpert](http://sophiebits.com/) is the first person outside of Facebook and Instagram to push React code to production. We are very grateful for her contributions in form of pull requests, bug reports and presence on IRC ([#reactjs on Freenode](irc://chat.freenode.net/reactjs)). Sophie wrote about her experience using React: @@ -16,7 +16,7 @@ It looks like [Sophie Alpert](http://sophiebits.com/) is the first person outsid > > [Read the full post...](http://sophiebits.com/2013/06/09/using-react-to-speed-up-khan-academy.html) -## Pimp my Backbone.View (by replacing it with React) +## Pimp my Backbone.View (by replacing it with React) {#pimp-my-backboneview-by-replacing-it-with-react} [Paul Seiffert](https://blog.mayflower.de/) wrote a blog post that explains how to integrate React into Backbone applications. @@ -28,7 +28,7 @@ It looks like [Sophie Alpert](http://sophiebits.com/) is the first person outsid > > [Read the full post...](https://blog.mayflower.de/3937-Backbone-React.html) -## Using facebook's React with require.js +## Using facebook's React with require.js {#using-facebooks-react-with-requirejs} [Mario Mueller](http://blog.xenji.com/) wrote a menu component in React and was able to easily integrate it with require.js, EventEmitter2 and bower. @@ -36,7 +36,7 @@ It looks like [Sophie Alpert](http://sophiebits.com/) is the first person outsid > > [Read the full post...](http://blog.xenji.com/2013/06/facebooks-react-require-js.html) -## Origins of React +## Origins of React {#origins-of-react} [Pete Hunt](http://www.petehunt.net/blog/) explained what differentiates React from other JavaScript libraries in [a previous blog post](/blog/2013/06/05/why-react.html). [Lee Byron](http://leebyron.com/) gives another perspective on Quora: diff --git a/content/blog/2013-06-19-community-roundup-2.md b/content/blog/2013-06-19-community-roundup-2.md index 3350d682..3071db80 100644 --- a/content/blog/2013-06-19-community-roundup-2.md +++ b/content/blog/2013-06-19-community-roundup-2.md @@ -5,7 +5,7 @@ author: [vjeux] Since the launch we have received a lot of feedback and are actively working on React 0.4. In the meantime, here are the highlights of this week. -## Some quick thoughts on React +## Some quick thoughts on React {#some-quick-thoughts-on-react} [Andrew Greig](http://www.andrewgreig.com/) made a blog post that gives a high level description of what React is. @@ -19,7 +19,7 @@ Since the launch we have received a lot of feedback and are actively working on > > [Read the full post...](http://www.andrewgreig.com/637/) -## React and Socket.IO Chat Application +## React and Socket.IO Chat Application {#react-and-socketio-chat-application} [Danial Khosravi](https://danialk.github.io/) made a real-time chat application that interacts with the back-end using Socket.IO. @@ -28,7 +28,7 @@ Since the launch we have received a lot of feedback and are actively working on > > [Read the full post...](https://danialk.github.io/blog/2013/06/16/reactjs-and-socket-dot-io-chat-application/) -## React and Other Frameworks +## React and Other Frameworks {#react-and-other-frameworks} [Pete Hunt](http://www.petehunt.net/blog/) wrote an answer on Quora comparing React and Angular directives. At the end, he explains how you can make an Angular directive that is in fact being rendered with React. @@ -40,7 +40,7 @@ Since the launch we have received a lot of feedback and are actively working on In the same vein, [Markov Twain](https://twitter.com/markov_twain/status/345702941845499906) re-implemented the examples on the front-page [with Ember](http://jsbin.com/azihiw/2/edit) and [Vlad Yazhbin](https://twitter.com/vla) re-implemented the tutorial [with Angular](http://jsfiddle.net/vla/Cdrse/). -## Web Components: React & x-tags +## Web Components: React & x-tags {#web-components-react--x-tags} Mozilla and Google are actively working on Web Components. [Vjeux](http://blog.vjeux.com/) wrote a proof of concept that shows how to implement them using React. @@ -49,7 +49,7 @@ Mozilla and Google are actively working on Web Components. [Vjeux](http://blog.v > > [Read the full post...](http://blog.vjeux.com/2013/javascript/custom-components-react-x-tags.html) -## React TodoMVC Example +## React TodoMVC Example {#react-todomvc-example} [TodoMVC.com](http://todomvc.com/) is a website that collects various implementations of the same basic Todo app. [Pete Hunt](http://www.petehunt.net/blog/) wrote an idiomatic React version. @@ -60,7 +60,7 @@ Mozilla and Google are actively working on Web Components. [Vjeux](http://blog.v > > [Read the source code...](https://github.com/tastejs/todomvc/tree/gh-pages/labs/architecture-examples/react) -## JSX is not HTML +## JSX is not HTML {#jsx-is-not-html} Many of you pointed out differences between JSX and HTML. In order to clear up some confusion, we have added some documentation that covers the four main differences: diff --git a/content/blog/2013-06-21-react-v0-3-3.md b/content/blog/2013-06-21-react-v0-3-3.md index f09bf8a6..31f150de 100644 --- a/content/blog/2013-06-21-react-v0-3-3.md +++ b/content/blog/2013-06-21-react-v0-3-3.md @@ -6,18 +6,18 @@ author: [zpao] We have a ton of great stuff coming in v0.4, but in the meantime we're releasing v0.3.3. This release addresses some small issues people were having and simplifies our tools to make them easier to use. -## react-tools +## react-tools {#react-tools} * Upgrade Commoner so `require` statements are no longer relativized when passing through the transformer. This was a feature needed when building React, but doesn't translate well for other consumers of `bin/jsx`. * Upgraded our dependencies on Commoner and Recast so they use a different directory for their cache. * Freeze our esprima dependency. -## React +## React {#react} * Allow reusing the same DOM node to render different components. e.g. `React.renderComponent(
, domNode); React.renderComponent(, domNode);` will work now. -## JSXTransformer +## JSXTransformer {#jsxtransformer} * Improved the in-browser transformer so that transformed scripts will execute in the expected scope. The allows components to be defined and used from separate files. diff --git a/content/blog/2013-06-27-community-roundup-3.md b/content/blog/2013-06-27-community-roundup-3.md index 2d297f20..371da7ed 100644 --- a/content/blog/2013-06-27-community-roundup-3.md +++ b/content/blog/2013-06-27-community-roundup-3.md @@ -5,7 +5,7 @@ author: [vjeux] The highlight of this week is that an interaction-heavy app has been ported to React. React components are solving issues they had with nested views. -## Moving From Backbone To React +## Moving From Backbone To React {#moving-from-backbone-to-react} [Clay Allsopp](https://twitter.com/clayallsopp) successfully ported [Propeller](http://usepropeller.com/blog/posts/from-backbone-to-react/), a fairly big, interaction-heavy JavaScript app, to React. @@ -17,7 +17,7 @@ The highlight of this week is that an interaction-heavy app has been ported to R > > [Read the full post...](http://usepropeller.com/blog/posts/from-backbone-to-react/) -## Grunt Task for JSX +## Grunt Task for JSX {#grunt-task-for-jsx} [Eric Clemmons](https://ericclemmons.github.io/) wrote a task for [Grunt](http://gruntjs.com/) that applies the JSX transformation to your JavaScript files. It also works with [Browserify](http://browserify.org/) if you want all your files to be concatenated and minified together. @@ -45,7 +45,7 @@ The highlight of this week is that an interaction-heavy app has been ported to R > > [Check out the project ...](https://github.com/ericclemmons/grunt-react) -## Backbone/Handlebars Nested Views +## Backbone/Handlebars Nested Views {#backbonehandlebars-nested-views} [Joel Burget](http://joelburget.com/) wrote a blog post talking about the way we would write React-like components in Backbone and Handlebars. @@ -57,13 +57,13 @@ The highlight of this week is that an interaction-heavy app has been ported to R > > [Read the full post...](http://joelburget.com/react/) -## JSRomandie Meetup +## JSRomandie Meetup {#jsromandie-meetup} [Renault John Lecoultre](https://twitter.com/renajohn/) from [BugBuster](http://www.bugbuster.com) did a React introduction talk at a JS meetup called [JS Romandie](https://twitter.com/jsromandie) last week. -## CoffeeScript integration +## CoffeeScript integration {#coffeescript-integration} [Vjeux](http://blog.vjeux.com/) used the fact that JSX is just a syntactic sugar on-top of regular JS to rewrite the React front-page examples in CoffeeScript. @@ -81,7 +81,7 @@ The highlight of this week is that an interaction-heavy app has been ported to R > > [Read the full post...](http://blog.vjeux.com/2013/javascript/react-coffeescript.html) -## Tutorial in Plain JavaScript +## Tutorial in Plain JavaScript {#tutorial-in-plain-javascript} We've seen a lot of people comparing React with various frameworks. [Ricardo Tomasi](http://ricardo.cc/) decided to re-implement the tutorial without any framework, just plain JavaScript. diff --git a/content/blog/2013-07-02-react-v0-4-autobind-by-default.md b/content/blog/2013-07-02-react-v0-4-autobind-by-default.md index c8e5155f..9c98fd9b 100644 --- a/content/blog/2013-07-02-react-v0-4-autobind-by-default.md +++ b/content/blog/2013-07-02-react-v0-4-autobind-by-default.md @@ -6,7 +6,7 @@ author: [zpao] React v0.4 is very close to completion. As we finish it off, we'd like to share with you some of the major changes we've made since v0.3. This is the first of several posts we'll be making over the next week. -## What is React.autoBind? +## What is React.autoBind? {#what-is-reactautobind} If you take a look at most of our current examples, you'll see us using `React.autoBind` for event handlers. This is used in place of `Function.prototype.bind`. Remember that in JS, [function calls are late-bound](https://bonsaiden.github.io/JavaScript-Garden/#function.this). That means that if you simply pass a function around, the `this` used inside won't necessarily be the `this` you expect. `Function.prototype.bind` creates a new, properly bound, function so that when called, `this` is exactly what you expect it to be. @@ -33,7 +33,7 @@ React.createClass({ ``` -## What's Changing in v0.4? +## What's Changing in v0.4? {#whats-changing-in-v04} After using `React.autoBind` for a few weeks, we realized that there were very few times that we didn't want that behavior. So we made it the default! Now all methods defined within `React.createClass` will already be bound to the correct instance. diff --git a/content/blog/2013-07-03-community-roundup-4.md b/content/blog/2013-07-03-community-roundup-4.md index 12c32a11..b7bd158c 100644 --- a/content/blog/2013-07-03-community-roundup-4.md +++ b/content/blog/2013-07-03-community-roundup-4.md @@ -5,7 +5,7 @@ author: [vjeux] React reconciliation process appears to be very well suited to implement a text editor with a live preview as people at Khan Academy show us. -## Khan Academy +## Khan Academy {#khan-academy} [Ben Kamens](http://bjk5.com/) explains how [Sophie Alpert](http://sophiebits.com/) and [Joel Burget](http://joelburget.com/) are promoting React inside of [Khan Academy](https://www.khanacademy.org/). They now have three projects in the works using React. @@ -21,7 +21,7 @@ The best part is the demo of how React reconciliation process makes live editing [![](../images/blog/monkeys.gif)](http://bjk5.com/post/53742233351/getting-your-team-to-adopt-new-technology) -## React Snippets +## React Snippets {#react-snippets} Over the past several weeks, members of our team, [Pete Hunt](http://www.petehunt.net/) and [Paul O'Shannessy](http://zpao.com/), answered many questions that were asked in the [React group](https://groups.google.com/forum/#!forum/reactjs). They give a good overview of how to integrate React with other libraries and APIs through the use of [Mixins](/docs/reusable-components.html) and [Lifecycle Methods](/docs/working-with-the-browser.html). @@ -44,13 +44,13 @@ Over the past several weeks, members of our team, [Pete Hunt](http://www.petehun > > * [JSFiddle](http://jsfiddle.net/LQxy7/): Your React component simply render empty divs, and then in componentDidMount() you call React.renderComponent() on each of those divs to set up a new root React tree. Be sure to explicitly unmountAndReleaseReactRootNode() for each component in componentWillUnmount(). -## Introduction to React Screencast +## Introduction to React Screencast {#introduction-to-react-screencast} [Pete Hunt](http://www.petehunt.net/) recorded himself implementing a simple `` tag in React.
-## Snake in React +## Snake in React {#snake-in-react} [Tom Occhino](http://tomocchino.com/) implemented Snake in 150 lines with React. diff --git a/content/blog/2013-07-11-react-v0-4-prop-validation-and-default-values.md b/content/blog/2013-07-11-react-v0-4-prop-validation-and-default-values.md index e7b09169..8a5cc18c 100644 --- a/content/blog/2013-07-11-react-v0-4-prop-validation-and-default-values.md +++ b/content/blog/2013-07-11-react-v0-4-prop-validation-and-default-values.md @@ -6,7 +6,7 @@ author: [zpao] Many of the questions we got following the public launch of React revolved around `props`, specifically that people wanted to do validation and to make sure their components had sensible defaults. -## Validation +## Validation {#validation} Oftentimes you want to validate your `props` before you use them. Perhaps you want to ensure they are a specific type. Or maybe you want to restrict your prop to specific values. Or maybe you want to make a specific prop required. This was always possible — you could have written validations in your `render` or `componentWillReceiveProps` functions, but that gets clunky fast. @@ -29,7 +29,7 @@ React.createClass({ ``` -## Default Values +## Default Values {#default-values} One common pattern we've seen with our React code is to do something like this: diff --git a/content/blog/2013-07-17-react-v0-4-0.md b/content/blog/2013-07-17-react-v0-4-0.md index 0c229a7c..2a50e8b1 100644 --- a/content/blog/2013-07-17-react-v0-4-0.md +++ b/content/blog/2013-07-17-react-v0-4-0.md @@ -13,7 +13,7 @@ React v0.4 has some big changes. We've also restructured the documentation to be When you're ready, [go download it](/docs/installation.html)! -### React +### React {#react} * Switch from using `id` attribute to `data-reactid` to track DOM nodes. This allows you to integrate with other JS and CSS libraries more easily. * Support for more DOM elements and attributes (e.g., ``) @@ -25,7 +25,7 @@ When you're ready, [go download it](/docs/installation.html)! * We've implemented an improved synthetic event system that conforms to the W3C spec. * Updates to your component are batched now, which may result in a significantly faster re-render of components. `this.setState` now takes an optional callback as its second parameter. If you were using `onClick={this.setState.bind(this, state)}` previously, you'll want to make sure you add a third parameter so that the event is not treated as the callback. -### JSX +### JSX {#jsx} * Support for comment nodes `
{/* this is a comment and won't be rendered */}
` * Children are now transformed directly into arguments instead of being wrapped in an array @@ -33,7 +33,7 @@ When you're ready, [go download it](/docs/installation.html)! Previously this would be transformed into `React.DOM.div(null, [Component1(null), Component2(null)])`. If you were using React without JSX previously, your code should still work. -### react-tools +### react-tools {#react-tools} * Fixed a number of bugs when transforming directories * No longer re-write `require()`s to be relative unless specified diff --git a/content/blog/2013-07-23-community-roundup-5.md b/content/blog/2013-07-23-community-roundup-5.md index 34d74869..02e0d535 100644 --- a/content/blog/2013-07-23-community-roundup-5.md +++ b/content/blog/2013-07-23-community-roundup-5.md @@ -5,7 +5,7 @@ author: [vjeux] We launched the [React Facebook Page](https://www.facebook.com/react) along with the React v0.4 launch. 700 people already liked it to get updated on the project :) -## Cross-browser onChange +## Cross-browser onChange {#cross-browser-onchange} [Sophie Alpert](http://sophiebits.com/) from [Khan Academy](https://www.khanacademy.org/) worked on a cross-browser implementation of `onChange` event that landed in v0.4. She wrote a blog post explaining the various browser quirks she had to deal with. @@ -16,7 +16,7 @@ We launched the [React Facebook Page](https://www.facebook.com/react) along with > [Read the full post...](http://sophiebits.com/2013/06/18/a-near-perfect-oninput-shim-for-ie-8-and-9.html) -## React Samples +## React Samples {#react-samples} Learning a new library is always easier when you have working examples you can play with. [jwh](https://github.com/jhw) put many of them on his [react-samples GitHub repo](https://github.com/jhw/react-samples). @@ -50,7 +50,7 @@ Learning a new library is always easier when you have working examples you can p > * Toggle [#1](https://rawgithub.com/jhw/react-samples/master/html/toggle.html) -## React Chosen Wrapper +## React Chosen Wrapper {#react-chosen-wrapper} [Cheng Lou](https://github.com/chenglou) wrote a wrapper for the [Chosen](https://harvesthq.github.io/chosen/) input library called [react-chosen](https://github.com/chenglou/react-chosen). It took just 25 lines to be able to use jQuery component as a React one. @@ -64,21 +64,21 @@ React.renderComponent( ``` -## JSX and ES6 Template Strings +## JSX and ES6 Template Strings {#jsx-and-es6-template-strings} [Domenic Denicola](http://domenicdenicola.com/) wrote a slide deck about the great applications of ES6 features and one slide shows how we could use Template Strings to compile JSX at run-time without the need for a pre-processing phase.
-## React Presentation +## React Presentation {#react-presentation} [Tom Occhino](http://tomocchino.com/) and [Jordan Walke](https://github.com/jordwalke), React developers, did a presentation of React at Facebook Seattle's office. Check out the first 25 minutes for the presentation and the remaining 45 for a Q&A. I highly recommend you watching this video.
-## Docs +## Docs {#docs} [Pete Hunt](http://www.petehunt.net/) rewrote the entirety of the docs for v0.4. The goal was to add more explanation about why we built React and what the best practices are. diff --git a/content/blog/2013-07-26-react-v0-4-1.md b/content/blog/2013-07-26-react-v0-4-1.md index 569c45a8..181bb09b 100644 --- a/content/blog/2013-07-26-react-v0-4-1.md +++ b/content/blog/2013-07-26-react-v0-4-1.md @@ -6,7 +6,7 @@ author: [zpao] React v0.4.1 is a small update, mostly containing correctness fixes. Some code has been restructured internally but those changes do not impact any of our public APIs. -## React +## React {#react} * `setState` callbacks are now executed in the scope of your component. * `click` events now work on Mobile Safari. @@ -16,7 +16,7 @@ React v0.4.1 is a small update, mostly containing correctness fixes. Some code h * Added checksums to detect and correct cases where server-side rendering markup mismatches what React expects client-side. -## JSXTransformer +## JSXTransformer {#jsxtransformer} * Improved environment detection so it can be run in a non-browser environment. diff --git a/content/blog/2013-07-30-use-react-and-jsx-in-ruby-on-rails.md b/content/blog/2013-07-30-use-react-and-jsx-in-ruby-on-rails.md index e436b671..60529a4c 100644 --- a/content/blog/2013-07-30-use-react-and-jsx-in-ruby-on-rails.md +++ b/content/blog/2013-07-30-use-react-and-jsx-in-ruby-on-rails.md @@ -12,7 +12,7 @@ This gem has 2 primary purposes: 2. To allow you to write JSX without an external build step to transform that into JS. -## Packaging react.js +## Packaging react.js {#packaging-reactjs} To make `react.js` available for use client-side, simply add `react` to your manifest, and declare the variant you'd like to use in your environment. When you use `:production`, the minified and optimized `react.min.js` will be used instead of the development version. For example: @@ -32,7 +32,7 @@ end ``` -## Writing JSX +## Writing JSX {#writing-jsx} When you name your file with `myfile.js.jsx`, `react-rails` will automatically try to transform that file. For the time being, we still require that you include the docblock at the beginning of the file. For example, this file will get transformed on request. @@ -42,12 +42,12 @@ React.renderComponent(, document.getElementById('example')) ``` -## Asset Pipeline +## Asset Pipeline {#asset-pipeline} `react-rails` takes advantage of the [asset pipeline](http://guides.rubyonrails.org/asset_pipeline.html) that was introduced in Rails 3.1. A very important part of that pipeline is the `assets:precompile` Rake task. `react-rails` will ensure that your JSX files will be transformed into regular JS before all of your assets are minified and packaged. -## Installation +## Installation {#installation} Installation follows the same process you're familiar with. You can install it globally with `gem install react-rails`, though we suggest you add the dependency to your `Gemfile` directly. diff --git a/content/blog/2013-08-05-community-roundup-6.md b/content/blog/2013-08-05-community-roundup-6.md index 987a0fa0..22db39d8 100644 --- a/content/blog/2013-08-05-community-roundup-6.md +++ b/content/blog/2013-08-05-community-roundup-6.md @@ -5,13 +5,13 @@ author: [vjeux] This is the first Community Round-up where none of the items are from Facebook/Instagram employees. It's great to see the adoption of React growing. -## React Game Tutorial +## React Game Tutorial {#react-game-tutorial} [Caleb Cassel](https://twitter.com/CalebCassel) wrote a [step-by-step tutorial](https://rawgithub.com/calebcassel/react-demo/master/part1.html) about making a small game. It covers JSX, State and Events, Embedded Components and Integration with Backbone.
-## Reactify +## Reactify {#reactify} [Andrey Popp](http://andreypopp.com/) created a [Browserify](http://browserify.org/) helper to compile JSX files. @@ -27,7 +27,7 @@ This is the first Community Round-up where none of the items are from Facebook/I -## React Integration with Este +## React Integration with Este {#react-integration-with-este} [Daniel Steigerwald](http://daniel.steigerwald.cz/) is now using React within [Este](https://github.com/steida/este), which is a development stack for web apps in CoffeeScript that are statically typed using the Closure Library. @@ -52,7 +52,7 @@ este.demos.react.todoApp = este.react.create (`/** @lends {React.ReactComponent. [Check it out on GitHub...](https://github.com/steida/este-library/blob/master/este/demos/thirdparty/react/start.coffee) -## React Stylus Boilerplate +## React Stylus Boilerplate {#react-stylus-boilerplate} [Zaim Bakar](https://zaim.github.io/) shared his boilerplate to get started with Stylus CSS processor. @@ -67,7 +67,7 @@ este.demos.react.todoApp = este.react.create (`/** @lends {React.ReactComponent. > [Check it out on GitHub...](https://github.com/zaim/react-stylus-boilerplate) -## WebFUI +## WebFUI {#webfui} [Conrad Barski](http://lisperati.com/), author of the popular book [Land of Lisp](http://landoflisp.com/), wants to use React for his ClojureScript library called [WebFUI](https://github.com/drcode/webfui). diff --git a/content/blog/2013-08-19-use-react-and-jsx-in-python-applications.md b/content/blog/2013-08-19-use-react-and-jsx-in-python-applications.md index 95375f38..bbbc4da6 100644 --- a/content/blog/2013-08-19-use-react-and-jsx-in-python-applications.md +++ b/content/blog/2013-08-19-use-react-and-jsx-in-python-applications.md @@ -5,7 +5,7 @@ author: [kmeht] Today we're happy to announce the initial release of [PyReact](https://github.com/facebook/react-python), which makes it easier to use React and JSX in your Python applications. It's designed to provide an API to transform your JSX files into JavaScript, as well as provide access to the latest React source files. -## Usage +## Usage {#usage} Transform your JSX files via the provided `jsx` module: @@ -30,7 +30,7 @@ from react import source react_js = source.path_for('react.min.js') ``` -## Django +## Django {#django} PyReact includes a JSX compiler for [django-pipeline](https://github.com/cyberdelia/django-pipeline). Add it to your project's pipeline settings like this: @@ -40,7 +40,7 @@ PIPELINE_COMPILERS = ( ) ``` -## Installation +## Installation {#installation} PyReact is hosted on PyPI, and can be installed with `pip`: diff --git a/content/blog/2013-08-26-community-roundup-7.md b/content/blog/2013-08-26-community-roundup-7.md index fd5cb62e..bc526b46 100644 --- a/content/blog/2013-08-26-community-roundup-7.md +++ b/content/blog/2013-08-26-community-roundup-7.md @@ -14,13 +14,13 @@ It's been three months since we open sourced React and it is going well. Some st * 2 early adopters: [Khan Academy](http://sophiebits.com/2013/06/09/using-react-to-speed-up-khan-academy.html) and [Propeller](http://usepropeller.com/blog/posts/from-backbone-to-react/) -## Wolfenstein Rendering Engine Ported to React +## Wolfenstein Rendering Engine Ported to React {#wolfenstein-rendering-engine-ported-to-react} [Pete Hunt](http://www.petehunt.net/) ported the render code of the web version of Wolfenstein 3D to React. Check out [the demo](http://www.petehunt.net/wolfenstein3D-react/wolf3d.html) and [render.js](https://github.com/petehunt/wolfenstein3D-react/blob/master/js/renderer.js#L183) file for the implementation.
-## React & Meteor +## React & Meteor {#react--meteor} [Ben Newman](https://twitter.com/benjamn) made a [13-lines wrapper](https://github.com/benjamn/meteor-react/blob/master/lib/mixin.js) to use React and Meteor together. [Meteor](http://www.meteor.com/) handles the real-time data synchronization between client and server. React provides the declarative way to write the interface and only updates the parts of the UI that changed. @@ -46,7 +46,7 @@ It's been three months since we open sourced React and it is going well. Some st > > [Read more ...](https://github.com/benjamn/meteor-react) -## React Page +## React Page {#react-page} [Jordan Walke](https://github.com/jordwalke) implemented a complete React project creator called [react-page](https://github.com/facebook/react-page/). It supports both server-side and client-side rendering, source transform and packaging JSX files using CommonJS modules, and instant reload. diff --git a/content/blog/2013-09-24-community-roundup-8.md b/content/blog/2013-09-24-community-roundup-8.md index e91b13e6..d94649e0 100644 --- a/content/blog/2013-09-24-community-roundup-8.md +++ b/content/blog/2013-09-24-community-roundup-8.md @@ -9,7 +9,7 @@ First, we are organizing a [React Hackathon](http://reactjshack-a-thon.splashtha We've also reached a point where there are too many questions for us to handle directly. We're encouraging people to ask questions on [StackOverflow](http://stackoverflow.com/questions/tagged/reactjs) using the tag [[reactjs]](http://stackoverflow.com/questions/tagged/reactjs). Many members of the team and community have subscribed to the tag, so feel free to ask questions there. We think these will be more discoverable than Google Groups archives or IRC logs. -## JavaScript Jabber +## JavaScript Jabber {#javascript-jabber} [Pete Hunt](http://www.petehunt.net/) and [Jordan Walke](https://github.com/jordwalke) were interviewed on [JavaScript Jabber](http://javascriptjabber.com/073-jsj-react-with-pete-hunt-and-jordan-walke/) for an hour. They go over many aspects of React such as 60 FPS, Data binding, Performance, Diffing Algorithm, DOM Manipulation, Node.js support, server-side rendering, JSX, requestAnimationFrame and the community. This is a gold mine of information about React. @@ -24,13 +24,13 @@ We've also reached a point where there are too many questions for us to handle d > [Read the full conversation ...](http://javascriptjabber.com/073-jsj-react-with-pete-hunt-and-jordan-walke/) -## JSXTransformer Trick +## JSXTransformer Trick {#jsxtransformer-trick} While this is not going to work for all the attributes since they are camelCased in React, this is a pretty cool trick.
-## Remarkable React +## Remarkable React {#remarkable-react} [Stoyan Stefanov](http://www.phpied.com/) gave a talk at [BrazilJS](http://braziljs.com.br/) about React and wrote an article with the content of the presentation. He goes through the difficulties of writing _active apps_ using the DOM API and shows how React handles it. @@ -49,18 +49,18 @@ While this is not going to work for all the attributes since they are camelCased > [Read More ...](http://www.phpied.com/remarkable-react/) -## Markdown in React +## Markdown in React {#markdown-in-react} [Sophie Alpert](http://sophiebits.com/) converted [marked](https://github.com/chjj/marked), a Markdown JavaScript implementation, in React: [marked-react](https://github.com/sophiebits/marked-react). Even without using JSX, the HTML generation is now a lot cleaner. It is also safer as forgetting a call to `escape` will not introduce an XSS vulnerability.
-## Unite from BugBusters +## Unite from BugBusters {#unite-from-bugbusters} [Renault John Lecoultre](https://twitter.com/renajohn) wrote [Unite](https://www.bugbuster.com/), an interactive tool for analyzing code dynamically using React. It integrates with CodeMirror.
-## #reactjs IRC Logs +## #reactjs IRC Logs {#reactjs-irc-logs} [Vjeux](http://blog.vjeux.com/) re-implemented the display part of the IRC logger in React. Just 130 lines are needed for a performant infinite scroll with timestamps and color-coded author names. diff --git a/content/blog/2013-10-16-react-v0.5.0.md b/content/blog/2013-10-16-react-v0.5.0.md index 46836135..88b7f4d7 100644 --- a/content/blog/2013-10-16-react-v0.5.0.md +++ b/content/blog/2013-10-16-react-v0.5.0.md @@ -9,16 +9,16 @@ The biggest change you'll notice as a developer is that we no longer support `cl The other major change in v0.5 is that we've added an additional build - `react-with-addons` - which adds support for some extras that we've been working on including animations and two-way binding. [Read more about these addons in the docs](/docs/addons.html). -## Thanks to Our Community +## Thanks to Our Community {#thanks-to-our-community} We added *22 new people* to the list of authors since we launched React v0.4.1 nearly 3 months ago. With a total of 48 names in our `AUTHORS` file, that means we've nearly doubled the number of contributors in that time period. We've seen the number of people contributing to discussion on IRC, mailing lists, Stack Overflow, and GitHub continue rising. We've also had people tell us about talks they've given in their local community about React. It's been awesome to see the things that people are building with React, and we can't wait to see what you come up with next! -## Changelog +## Changelog {#changelog} -### React +### React {#react} * Memory usage improvements - reduced allocations in core which will help with GC pauses * Performance improvements - in addition to speeding things up, we made some tweaks to stay out of slow path code in V8 and Nitro. @@ -39,11 +39,11 @@ It's been awesome to see the things that people are building with React, and we * Better support for server-side rendering - [react-page](https://github.com/facebook/react-page) has helped improve the stability for server-side rendering. * Made it possible to use React in environments enforcing a strict [Content Security Policy](https://developer.mozilla.org/en-US/docs/Security/CSP/Introducing_Content_Security_Policy). This also makes it possible to use React to build Chrome extensions. -### React with Addons (New!) +### React with Addons (New!) {#react-with-addons-new} * Introduced a separate build with several "addons" which we think can help improve the React experience. We plan to deprecate this in the long-term, instead shipping each as standalone pieces. [Read more in the docs](/docs/addons.html). -### JSX +### JSX {#jsx} * No longer transform `class` to `className` as part of the transform! This is a breaking change - if you were using `class`, you *must* change this to `className` or your components will be visually broken. * Added warnings to the in-browser transformer to make it clear it is not intended for production use. diff --git a/content/blog/2013-10-29-react-v0-5-1.md b/content/blog/2013-10-29-react-v0-5-1.md index 08407d6a..e70b7308 100644 --- a/content/blog/2013-10-29-react-v0-5-1.md +++ b/content/blog/2013-10-29-react-v0-5-1.md @@ -5,16 +5,16 @@ author: [zpao] This release focuses on fixing some small bugs that have been uncovered over the past two weeks. I would like to thank everybody involved, specifically members of the community who fixed half of the issues found. Thanks to [Sophie Alpert][1], [Andrey Popp][2], and [Laurence Rowe][3] for their contributions! -## Changelog +## Changelog {#changelog} -### React +### React {#react} * Fixed bug with `` and selection events. * Fixed bug with selection and focus. * Made it possible to unmount components from the document root. * Fixed bug for `disabled` attribute handling on non-`` elements. -### React with Addons +### React with Addons {#react-with-addons} * Fixed bug with transition and animation event detection. diff --git a/content/blog/2013-10-3-community-roundup-9.md b/content/blog/2013-10-3-community-roundup-9.md index d69d4644..9eb3d2d1 100644 --- a/content/blog/2013-10-3-community-roundup-9.md +++ b/content/blog/2013-10-3-community-roundup-9.md @@ -8,7 +8,7 @@ We organized a React hackathon last week-end in the Facebook Seattle office. 50 ![](../images/blog/react-hackathon.jpg) -## React Hackathon Winner +## React Hackathon Winner {#react-hackathon-winner} [Alex Swan](http://bold-it.com/) implemented [Qu.izti.me](http://qu.izti.me/), a multi-player quiz game. It is real-time via Web Socket and mobile friendly. @@ -19,7 +19,7 @@ We organized a React hackathon last week-end in the Facebook Seattle office. 50 > > [Read More...](http://bold-it.com/javascript/facebook-react-example/) -## JSConf EU Talk: Rethinking Best Practices +## JSConf EU Talk: Rethinking Best Practices {#jsconf-eu-talk-rethinking-best-practices} [Pete Hunt](http://www.petehunt.net/) presented React at JSConf EU. He covers three controversial design decisions of React: @@ -32,7 +32,7 @@ The video will be available soon on the [JSConf EU website](http://2013.jsconf.e
-## Pump - Clojure bindings for React +## Pump - Clojure bindings for React {#pump---clojure-bindings-for-react} [Alexander Solovyov](http://solovyov.net/) has been working on React bindings for ClojureScript. This is really exciting as it is using "native" ClojureScript data structures. @@ -52,7 +52,7 @@ The video will be available soon on the [JSConf EU website](http://2013.jsconf.e [Check it out on GitHub...](https://github.com/piranha/pump) -## JSXHint +## JSXHint {#jsxhint} [Todd Kennedy](http://blog.selfassembled.org/) working at [Condé Nast](http://www.condenast.com/) implemented a wrapper on-top of [JSHint](http://www.jshint.com/) that first converts JSX files to JS. @@ -65,7 +65,7 @@ The video will be available soon on the [JSConf EU website](http://2013.jsconf.e > [Check it out on GitHub...](https://github.com/CondeNast/JSXHint) -## Turbo React +## Turbo React {#turbo-react} [Ross Allen](https://twitter.com/ssorallen) working at [Mesosphere](http://mesosphere.io/) combined [Turbolinks](https://github.com/rails/turbolinks/), a library used by Ruby on Rails to speed up page transition, and React. @@ -79,7 +79,7 @@ The video will be available soon on the [JSConf EU website](http://2013.jsconf.e > [Check out the demo...](https://turbo-react.herokuapp.com/) -## Reactive Table +## Reactive Table {#reactive-table} [Stoyan Stefanov](http://www.phpied.com/) continues his series of blog posts about React. This one is an introduction tutorial on rendering a simple table with React. diff --git a/content/blog/2013-11-06-community-roundup-10.md b/content/blog/2013-11-06-community-roundup-10.md index 6aa3a9b6..f85b77e6 100644 --- a/content/blog/2013-11-06-community-roundup-10.md +++ b/content/blog/2013-11-06-community-roundup-10.md @@ -7,7 +7,7 @@ This is the 10th round-up already and React has come quite far since it was open The best part is that no drastic changes have been required to support all those use cases. Most of the efforts were targeted at polishing edge cases, performance improvements, and documentation. -## Khan Academy - Officially moving to React +## Khan Academy - Officially moving to React {#khan-academy---officially-moving-to-react} [Joel Burget](http://joelburget.com/) announced at Hack Reactor that new front-end code at Khan Academy should be written in React! @@ -22,14 +22,14 @@ The best part is that no drastic changes have been required to support all those > [Read the full article](http://joelburget.com/backbone-to-react/) -## React: Rethinking best practices +## React: Rethinking best practices {#react-rethinking-best-practices} [Pete Hunt](http://www.petehunt.net/)'s talk at JSConf EU 2013 is now available in video.
-## Server-side React with PHP +## Server-side React with PHP {#server-side-react-with-php} [Stoyan Stefanov](http://www.phpied.com/)'s series of articles on React has two new entries on how to execute React on the server to generate the initial page load. @@ -50,7 +50,7 @@ The best part is that no drastic changes have been required to support all those >
-## TodoMVC Benchmarks +## TodoMVC Benchmarks {#todomvc-benchmarks} Webkit has a [TodoMVC Benchmark](https://github.com/WebKit/webkit/tree/master/PerformanceTests/DoYouEvenBench) that compares different frameworks. They recently included React and here are the results (average of 10 runs in Chrome 30): @@ -89,13 +89,13 @@ By default, React "re-renders" all the components when anything changes. This is The fact that you can control when components are rendered is a very important characteristic of React as it gives you control over its performance. We are going to talk more about performance in the future, stay tuned. -## Guess the filter +## Guess the filter {#guess-the-filter} [Connor McSheffrey](http://conr.me) implemented a small game using React. The goal is to guess which filter has been used to create the Instagram photo.
-## React vs FruitMachine +## React vs FruitMachine {#react-vs-fruitmachine} [Andrew Betts](http://trib.tv/), director of the [Financial Times Labs](http://labs.ft.com/), posted an article comparing [FruitMachine](https://github.com/ftlabs/fruitmachine) and React. @@ -105,7 +105,7 @@ The fact that you can control when components are rendered is a very important c Even though we weren't inspired by FruitMachine (React has been used in production since before FruitMachine was open sourced), it's great to see similar technologies emerging and becoming popular. -## React Brunch +## React Brunch {#react-brunch} [Matthew McCray](http://elucidata.net/) implemented [react-brunch](https://npmjs.org/package/react-brunch), a JSX compilation step for [Brunch](http://brunch.io/). @@ -117,7 +117,7 @@ Even though we weren't inspired by FruitMachine (React has been used in producti > > [Read more...](https://npmjs.org/package/react-brunch) -## Random Tweet +## Random Tweet {#random-tweet} I'm going to start adding a tweet at the end of each round-up. We'll start with this one: diff --git a/content/blog/2013-11-18-community-roundup-11.md b/content/blog/2013-11-18-community-roundup-11.md index 93862999..7fe40e47 100644 --- a/content/blog/2013-11-18-community-roundup-11.md +++ b/content/blog/2013-11-18-community-roundup-11.md @@ -5,14 +5,14 @@ author: [vjeux] This round-up is the proof that React has taken off from its Facebook's root: it features three in-depth presentations of React done by external people. This is awesome, keep them coming! -## Super VanJS 2013 Talk +## Super VanJS 2013 Talk {#super-vanjs-2013-talk} [Steve Luscher](https://github.com/steveluscher) working at [LeanPub](https://leanpub.com/) made a 30 min talk at [Super VanJS](https://twitter.com/vanjs). He does a remarkable job at explaining why React is so fast with very exciting demos using the HTML5 Audio API.
-## React Tips +## React Tips {#react-tips} [Connor McSheffrey](http://connormcsheffrey.com/) and [Cheng Lou](https://github.com/chenglou) added a new section to the documentation. It's a list of small tips that you will probably find useful while working on React. Since each article is very small and focused, we [encourage you to contribute](/tips/introduction.html)! @@ -30,7 +30,7 @@ This round-up is the proof that React has taken off from its Facebook's root: it - [False in JSX](/tips/false-in-jsx.html) -## Intro to the React Framework +## Intro to the React Framework {#intro-to-the-react-framework} [Pavan Podila](http://blog.pixelingene.com/) wrote an in-depth introduction to React on TutsPlus. This is definitively worth reading. @@ -40,7 +40,7 @@ This round-up is the proof that React has taken off from its Facebook's root: it > [Read the full article ...](http://dev.tutsplus.com/tutorials/intro-to-the-react-framework--net-35660) -## 140-characters textarea +## 140-characters textarea {#140-characters-textarea} [Brian Kim](https://github.com/brainkim) wrote a small textarea component that gradually turns red as you reach the 140-characters limit. Because he only changes the background color, React is smart enough not to mess with the text selection. @@ -48,13 +48,13 @@ This round-up is the proof that React has taken off from its Facebook's root: it -## Genesis Skeleton +## Genesis Skeleton {#genesis-skeleton} [Eric Clemmons](https://ericclemmons.github.io/) is working on a "Modern, opinionated, full-stack starter kit for rapid, streamlined application development". The version 0.4.0 has just been released and has first-class support for React.
a>
-## AgFlow Talk +## AgFlow Talk {#agflow-talk} [Robert Zaremba](http://rz.scale-it.pl/) working on [AgFlow](http://www.agflow.com/) recently talked in Poland about React. @@ -67,7 +67,7 @@ This round-up is the proof that React has taken off from its Facebook's root: it
-## JSX +## JSX {#jsx} [Todd Kennedy](http://tck.io/) working at Condé Nast wrote [JSXHint](https://github.com/CondeNast/JSXHint) and explains in a blog post his perspective on JSX. @@ -79,13 +79,13 @@ This round-up is the proof that React has taken off from its Facebook's root: it > [Read the full article...](http://tck.io/posts/jsxhint_and_react.html) -## Photo Gallery +## Photo Gallery {#photo-gallery} [Maykel Loomans](http://miekd.com/), designer at Instagram, wrote a gallery for photos he shot using React.
a>
-## Random Tweet +## Random Tweet {#random-tweet}
diff --git a/content/blog/2013-12-19-react-v0.8.0.md b/content/blog/2013-12-19-react-v0.8.0.md index 1a94597f..71c384d0 100644 --- a/content/blog/2013-12-19-react-v0.8.0.md +++ b/content/blog/2013-12-19-react-v0.8.0.md @@ -16,9 +16,9 @@ In order to make the transition to 0.8 for our current users as painless as poss We hope that by releasing `react` on npm, we will enable a new set of uses that have been otherwise difficult. All feedback is welcome! -## Changelog +## Changelog {#changelog} -### React +### React {#react} * Added support for more attributes: * `rows` & `cols` for `