Should I be using redux to allow communication between TabBar and Screen?

In my application, I am using a custom tab bar. It allows you to open up a menu where different filters and settings can be set which affect two of the three tab screens I have.

Most of my data is dealt with by realm and I do not use redux. It seems that redux would be incredibly complex just to pass one value through. I would like to persist those values.

What would be the easiest approach?

  • The question is very vague. Remember that only you know your code and use case, the only data we have is what’s in the question. That leads to a question as to what ‘pass one value’ means? What value is being passed? Where is that value stored? This site is for coding specific issues so when you’re coding and get stuck, post the code and troubleshooting and we’ll take a look. Please take a moment and review How to ask a good question and How to create a Minimal, Reproducible Example

    – 




  • Thank you, @Jay. I think my question is not really about a specific problem, but more about best practice. Basically, it is about how much data does it need to be before redux becomes useful. If it’s just about communication between two components (that, because of react-native, don’t share a close-enough common parent), do I really need a global state to handle it?

    – 




  • Understood. While it’s a good question, it’s not a good question for SO as it’s seeking an opinion e.g. Best Practice. See Good Topics and note Questions which are too broad, unclear, incomplete or primarily opinion-based may be closed by the community until they are improved. SO is a coding website; if you get stuck on some code, post it and the troubleshooting and we’ll take a look. There are help resources on reddit you can explore. Additionally, it’s not clear what Realm has to do with the question so some clarity there would help too.

    – 

Leave a Comment