diff --git a/docs/_js/examples/timer.js b/docs/_js/examples/timer.js index f6bdc3e92c829..f0488ec4030b9 100644 --- a/docs/_js/examples/timer.js +++ b/docs/_js/examples/timer.js @@ -3,7 +3,6 @@ */ var TIMER_COMPONENT = "\ -/** @jsx React.DOM */\n\ var Timer = React.createClass({\n\ getInitialState: function() {\n\ return {secondsElapsed: 0};\n\ @@ -15,15 +14,13 @@ var Timer = React.createClass({\n\ setInterval(this.tick, 1000);\n\ },\n\ render: function() {\n\ - return (\n\ -
- React uses a declarative paradigm that makes it easier to reason about - your application. + Write reusable UI components in JavaScript. Read and write to any data source.
- React minimizes interactions with the DOM by using a mock representation - of the DOM. + Describe how you want your component to look. React will automatically compute + the fastest way to keep the UI up-to-date when the data changes.
React components implement a `render()` method that takes input data and returns what to display. This example constructs the component using an - XML-like syntax called JSX. Input data is passed to the component as XML + XML-like syntax called JSX, but JSX is optional; you don't + need to use it. Input data is passed to the component as XML attributes, and `render()` accesses this data via `this.props`.
@@ -46,7 +46,8 @@ id: home In addition to taking data from its creator (accessed via `this.props`), a component can maintain internal state data (accessed via `this.state`). When a component's state data changes, the rendered - markup will be updated by re-invoking `render()`. + markup will be updated by re-invoking `render()`. This example + doesn't use JSX, but you could if you wanted to.