Answers for "how to return two components in react"

0

react return multiple components

function Example(num){
    const output = new Array();
    for(let i = 0; i< num ; i++){
        output.push(<Component />)
    }
    return output;
}
  
 return(
   {get_comments(this.props.comments)}
   )
Posted by: Guest on April-22-2022
0

how to return multiple components in react

const Pets = () => {
  return (
    <Fragment>
      <Dog />
      <Cat />
    </Fragment>
  )
}
Posted by: Guest on January-28-2022

Code answers related to "how to return two components in react"

Code answers related to "Javascript"

Browse Popular Code Answers by Language