Fork me on GitHub
#cljsrn
<
2019-06-17
>
worlds-endless13:06:58

I have successfully made the header-bar work via Navigation.navigate(). However, it is still established in the router. How can I make my header-bar change as a data internal to a navigator screen changes (e.g. creating something like Android fragments, where the fragment but not the Navigator screen changes, and the header menu should change too). Any ideas how to make the header bar dynamic?

worlds-endless15:06:02

Well, I've tried every combination of subscribe, as-element, as-component I can think of and am failing to find a way to make the navigation bar dynamically change with non-screen-changing events in the view

worlds-endless15:06:53

It appears that even when you provide a function to your navigationOptions, it is still evaluated only once and so is unresponsive to state changes

alex17:06:09

@worlds-endless So based on some of the code you pasted above, it's possible that you're running into the issue described here (https://github.com/reagent-project/reagent/blob/master/doc/CreatingReagentComponents.md#form-2--a-function-returning-a-function). See the subheader "Rookie Mistake" (I don't mean to call you a Rookie; I'm just pointing to the documentation) about having to re-declare the parameters within the inner render function. To address your code directly, where is the value for loaded coming from?

worlds-endless20:06:02

It's been a long time since I read those -- thanks for the reminder. Very useful!

alex16:06:18

Cool, did it help at all with your issue?

worlds-endless20:06:23

It did. Thanks!