title: How to re-initialize source and layer after changing map style using react map gl library
body: <p>I am trying to change map view from streets to satellite view using react map gl library components but getting console errors of compiler not able to find source for corresponding layers. I have used by default Source and layer component of this library which works fine on initial page load but doesn't seems to work on changing map style. Moreover the layers are displayed fine on the map even after compiler generating console errors for same.</p>
  <p>Can someone help me to diagnose the reason behind it and resolve it out completely.</p>
  <p><a href="https://i.stack.imgur.com/2agmF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2agmF.png" alt="Source Code" /></a></p>
  <p><a href="https://i.stack.imgur.com/Wn5so.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wn5so.png" alt="Console Errors" /></a></p>
  <p><a href="https://i.stack.imgur.com/0LK7v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0LK7v.png" alt="Another console error" /></a></p>