web-ridge / react-native-paper-tabs

Smooth and fast cross platform Material Design Tabs for React Native Paper
https://reactnativepapertabs.com
MIT License
189 stars 34 forks source link

dynamically change the label #36

Closed joaosouz4dev closed 2 years ago

joaosouz4dev commented 2 years ago

how to dynamically change the label according to a variable defined in a child component of a page without reloading the page and causing an infinite loop?

const [label, setLabel] = useState('nice');
<TabScreen label={label} icon="beaker-check">
   <component />
</TabScreen>
jslok commented 1 year ago

I'm running into this problem as well. Were you able to solve it? Thanks