forceUpdate
  • References/JavaScript/React/Component

forceUpdate void forceUpdate( [function callback] ) By

2025-01-10 15:47:30
React.Children.forEach
  • References/JavaScript/React/React

React React is the entry point to the React library. If you're using one of the prebuilt packages it's available

2025-01-10 15:47:30
If-Else in JSX
  • References/JavaScript/React/Tips

if-else statements don't work inside JSX. This is because JSX is just syntactic sugar for function calls and object construction. Take this basic example:

2025-01-10 15:47:30
replaceState
  • References/JavaScript/React/Component

replaceState void replaceState( object nextState, [function callback] )

2025-01-10 15:47:30
Expose Component Functions
  • References/JavaScript/React/Tips

There's another (uncommon) way of communicating between components: simply expose a method

2025-01-10 15:47:30
shouldComponentUpdate
  • References/JavaScript/React/Component

Updating: shouldComponentUpdate boolean shouldComponentUpdate( object nextProps, object

2025-01-10 15:47:30
getDOMNode
  • References/JavaScript/React/Component

getDOMNode DOMElement getDOMNode() If this component

2025-01-10 15:47:30
JSX Gotchas
  • References/JavaScript/React/Guides

JSX looks like HTML but there are some important differences you may run into. For DOM differences, such as the inline style

2025-01-10 15:47:30
React.cloneElement
  • References/JavaScript/React/React

React.cloneElement ReactElement cloneElement( ReactElement element, [object props]

2025-01-10 15:47:30
ReactDOM.render
  • References/JavaScript/React/React

ReactDOM.render render( ReactElement element, DOMElement container, [function callback]

2025-01-10 15:47:30