title: How to create multiple tags in React based on value passed through props
body: <p>how can I create multiple elements based on the value passed in props or initial state.</p>
  
  <pre><code>constructor(props, context) {
      this.state = {
          numberOfElements: this.props.numberOfElements || 6
      }
  
  render() {
      return (
          &lt;div&gt;
              {/*Six elements if not passed through props*/}
              span
              span
              ...
              span
          &lt;/div&gt;
     )
  }
  </code></pre>
  
  <p>Is there React.method available for this purpose?</p>