title: which is the correct way while using props in functional component in react
body: <p>which one is the correct way in react functional component and why?</p>
  
  <p>Way 1:</p>
  
  <pre><code>export function renderElements(props) {
  
     let { value, element } = props;
     return (
       &lt;!--- Code----!&gt;
     )
  }
  
  renderElements.defaultProps = {
     value: 0,
     element: 'Hello'
  }
  </code></pre>
  
  <p>Way 2</p>
  
  <pre><code>export function renderElements({
     value = 0,
     element = 'Hello'
  }) {
     return (
       &lt;!--- Code----!&gt;
     )
  }
  </code></pre>
  
  <p>Can you please suggest?</p>