title: Handling undefined/null properties in components during first render
body: <p>I'm learning react and it's great, but i've ran into an issue and i'm not sure what the best practice is to solve it.</p>
  
  <p>I'm fetching data from an API in my componentDidMount(), then i'm setting some states with SetState(). </p>
  
  <p>Now the problem is that because the first render happens before my states have been set, im sending the initial state values into my components. Right now i'm setting them to empty arrays or empty Objects ({ type: Object, default: () => ({}) }).
  Then i'm using ternary operator to check the .length or if the property has a value. </p>
  
  <p>Is this the best practice or is there some other way that i'm unaware of? </p>
  
  <p>I would love to get some help with this, so that i do the basics correctly right from the start.</p>
  
  <p>Thanks!</p>