Professional Documents
Culture Documents
ref accepts a callback function which will be called: Accessible as thiswithin class components
1. with the component instance or DOM node on mount. Stateless functional components do not have component instances.
2. with nullon unmount and when the passed in function changes. Serve as the object passed to refcallbacks
styleaccepts an object of styles, instead of a string. One component instance may persist over multiple equivalent ReactElements.
Properties
contains any props passed to React.createElement
propTypes
props
Available under React.PropTypes. Optionally append .isRequired. state contains state set by setStateand getInitialState
any array bool element func Methods
node number object string
1. setState(changes)applies the given changes to this.stateand re-renders
instanceOf(constructor) 2. forceUpdate()immediately re-renders the component to the DOM
oneOf(['News', 'Photos'])
oneOfType([propType, propType]) 2016 © James K Nelson - jamesknelson.com