function renderToDiv(props) {
  const div = document.createElement('div')
  render(
    <Toggle {...props}>
      {props.children || 'hello world'}
    </Toggle>,
    div,
  )
  return div
}
/**
 * Render the <Toggle /> component to a div with the given props
 * @param {Object} props - the props to apply to the <Toggle /> element
 * @returns {Element} - the div that contains the element
 */
Render the  component to a div with the given props
@param {Object} props - the props to apply to the  element
@returns {Element} - the div that contains the element
Render the component to a div with the given props @param { Object } props - the props to apply to the element @returns { Element } - the div that contains the element
function renderToDiv(props) {
  const div = document.createElement('div')
  render(
    <Toggle {...props}>
      {props.children || 'hello world'}
    </Toggle>,
    div,
  )
  return div
}
function renderToDiv ( props ) { const div = document . createElement ( 'div' ) render ( < Toggle { ... props } > { props . children || 'hello world' } < / Toggle > , div , ) return div }
Render the <Toggle /> component to a div with the given props
 @param {Object} props - the props to apply to the <Toggle /> element
 @returns {Element} - the div that contains the element
Render the <Toggle / > component to a div with the given props @param { Object } props - the props to apply to the <Toggle / > element @returns { Element } - the div that contains the element