0
votes

I am new on the React-Native and I am trying to get array count after add something.When I change the tab I get it but I want to get after add something. By the way I want to write in as "tabBarBadge".

If I am getting this correct, you want the state to update so something like. I have the number "0" and when I click on a button to add "+1" to the state it will update and show the number "1" instead of the number "0" without you refreshing the screen right ?Cyrus Zei
Yes you are right. This will be ecommerce app. I use mobx with observable and inject. I update variable in detail page after redirect to main page but cart doesn't update.Hamit
You can achieve this by storing the value in local storage. Ideal is to use redux store. are you using redux in your application?newdeveloper
you must use a state manager. you can use redux or context api, I recommended to you use context apiAmir Farahani
Thank you for your all replies. I started use redux.Hamit