随笔分类 - React
摘要:import React from 'react/addons';import Note from '../app/components/notes/Notes';var TestUtils = React.addons.TestUtils;describe('Note', () => { v...
阅读全文
摘要:class App extends React.Component{ constructor(){ super(); this.state = { count: 0 } } increaseCount(){ this.setState({count: this...
阅读全文
摘要:Mixins will allow you to apply behaviors to multiple React components.Components are the best way to reuse code in React, but sometimes very different...
阅读全文
摘要:The React component lifecycle will allow you to update your components at runtime. This lesson will explore how to do that.Updating: componentWillRece...
阅读全文
摘要:The previous lesson introduced the React component lifecycle mounting and unmounting. In this lesson you will learn some simple uses for these hooks. ...
阅读全文
摘要:React components have a lifecycle, and you are able to access specific phases of that lifecycle. This lesson will introduce mounting and unmounting of...
阅读全文
摘要:thetransferPropsTomethod lets you easily push properties into your components to easily customize attributes.From last two exmaples, we have BButton a...
阅读全文
摘要:To get the add-ons, usereact-with-addons.js(and its minified counterpart) rather than the commonreact.js.https://facebook.github.io/react/docs/addons....
阅读全文
摘要:When you're building your React components, you'll probably want to access child properties of the markup.Parentcan read its children by accessing the...
阅读全文
摘要:When you are using React components you need to be able to access specific references to individual components. This is done by defining aref. ...
阅读全文
摘要:The owner-ownee relationship is used to designate a parent-child relationship with React components as it differs from the DOM relationship.When one c...
阅读全文
摘要:State is used for properties on a component thatwill change, versus static properties that are passed in. This lesson will introduce you to taking inp...
阅读全文
摘要:var React_app = React.createClass({ render: function() { var age = this.props.age; var name = this.props.name; ...
阅读全文
摘要:React Lesson 1: render methodWhen you write return in render function, better to put () there.When you return multi-tags in return, include th...
阅读全文
摘要:React Lesson 0
阅读全文
摘要:React Hello World Read More:http://facebook.github.io/react/docs/getting-started.html /** @jsx React.DOM */This is a must to include in...
阅读全文
摘要:React Hello World Read More:http://facebook.github.io/react/docs/getting-started.html
阅读全文