title: Nextjs and Context API
body: <p>Working with Next.js and I am trying to save data inside Context API state after fetching them within <code>getInitialProps</code>, to fix props drilling.</p>
  <p>But since <code>getInitialProps</code> is a static method, we can't access it via this.context. I managed to save them within componentDidMount, but in that case, the Context state is empty on the first-page load until it populates. Not sure what the best practice would be in this case. In which lifecycle should I save initial data to Context in order to have them right away like with props passing?</p>