Forms
  • References/JavaScript/React/Guides

Form components such as <input>, <textarea>, and <option> differ from other native components because they can be mutated

2025-01-10 15:47:30
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
componentDidUpdate
  • References/JavaScript/React/Component

Updating: componentDidUpdate void componentDidUpdate( object prevProps, object prevState

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

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

2025-01-10 15:47:30
Immutability Helpers
  • References/JavaScript/React/Guides

React lets you use whatever style of data management you want, including mutation. However, if you can use immutable data in performance-critical parts of your application

2025-01-10 15:47:30
Communicate Between Components
  • References/JavaScript/React/Tips

For parent-child communication, simply pass props. For child-parent

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
Package Management
  • References/JavaScript/React/Guides

CDN-hosted React We provide CDN-hosted versions of React on our download page. These pre-built files use the UMD

2025-01-10 15:47:30