- Make your content editable
- Create a custom component
- General usage
- AngularJS 1
- Angular 2
- Data only
- Global methods
- Component HTML
- Component CSS
- Kitchen Sink
- Content Block
- Team Page
- Contact Form
- Carousel (Slideshow)
To use components with React, add the component tag via React’s
render and call
Component.render() when the React component has mounted:
Because React does not handle “custom” attributes like
data-load instead. React also requires you to use quotation marks (
") for attributes.
You can use
Component.render() by itself or with a callback or promise. See the section on Component.render for more.
You can render multiple components the same way as a single component. However, React does require that its internal
render function returns a single element. So to render multiple Component IO components in a single React component, you can wrap them in a common element such as a
<div>, like so:
You can call
Component.render() as often as you’d like in your React component (or elsewhere). This method will not lead to an API call every time; if a component has already been fetched once,
Component.render() will use that data instead of making another API call.
See the section on Component.render for more.