Boolean Templating in ReactJS

The Boolean field will add a switch for a true or false values for the content authors to pick from.

Output boolean value

Here is an example of how to retrieve the value from a Boolean field which has the API ID switch.

Here we are using a boolean value to decide whether a className is one value or the other.

render() {
  const position = ? 'right' : 'left';
  return (
        <div className={ position }>
          <h2>Text positioned by Boolean value...!</h2>