title: React navigation (v5): custom header buttons for specific tab screen
body: <p>I need to put buttons on the header in tab navigation. Each tab can have different buttons in the header and the buttons need to interact with the screen itself. For example, In my travel app, in the first tab I would have map button in the header which will toggle map/list view and in the wishlist tab I would have plus button in the header. </p>
  
  <p>When it's a standard screen (not tab) adding a button that interacts to the screen is easy and can be done as explained in: <a href="https://reactnavigation.org/docs/header-buttons#header-interaction-with-its-screen-component" rel="nofollow noreferrer">https://reactnavigation.org/docs/header-buttons#header-interaction-with-its-screen-component</a>. However, that doesn't work for screens under tabs. I found this documentation <a href="https://reactnavigation.org/docs/screen-options-resolution" rel="nofollow noreferrer">https://reactnavigation.org/docs/screen-options-resolution</a> on how to change header title and style on tab navigation but I can't find any info on how to add buttons in a way that it can interact with the screen since the component which define tabs is different than the screen component.</p>