0

I've got a custom drawer navigator that shows some profile information at the top. I can load the profile image from the server within the drawer, but this seems unnecessary as I'll be loading the profile information elsewhere as well (right after login). How can I get this profile information into my navigator from a different component?

jacob blankenship
  • 145
  • 1
  • 3
  • 16
  • If you need this profile picture on a few different components, i'd recommend you to take a loot at redux. If not, take a loot at this post: https://stackoverflow.com/questions/48990513/how-to-pass-state-of-one-component-to-another-in-react-native – kivul Nov 19 '18 at 16:33
  • Thanks for your comment, I know how to pass props between components, but one component is not a child of the other. They are only related through the navigator. Is there a way that I can fetch in my main app.js then send it as prop to all of the components within the router? this seems most logical IMO, but I cant make it work – jacob blankenship Nov 19 '18 at 21:43

0 Answers0