You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 20, 2021. It is now read-only.
Hi,
In native react navigation, we can use navigation.setParams to pass our functions into Header (by using navigationOptions and navigation.getParam as described in this)
But on the web, setParams does not work properly and serialize function into query-strings and urls get very messy.
Is there any better way to pass function into Header or Custom Navigators in react native web?
The text was updated successfully, but these errors were encountered:
blinky9
changed the title
pass function to Header or Custom Navigators into react native web?
pass function into Header or Custom Navigators in react native web?
Dec 29, 2019
@blinky9 A better way to handle this is to have the constructor or componentDidMount assign the function to a file level scoped variable that then would get used in your navigationOptions callback. Would have to have a dummy function assigned or check for undefined/null in case navigationOptions gets called before componentDidMount/constructor.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
In native react navigation, we can use navigation.setParams to pass our functions into Header (by using navigationOptions and navigation.getParam as described in this)
But on the web, setParams does not work properly and serialize function into query-strings and urls get very messy.
Is there any better way to pass function into Header or Custom Navigators in react native web?
The text was updated successfully, but these errors were encountered: