react-native-router-flux: navigationBarTitleImage prop doesn't show image

Version

Tell us which versions you are using:

  • react-native-router-flux v3.38.0
  • react-native v0.4.1

Expected behaviour

Nav bar header should show the image included.

Actual behaviour

Image included doesn’t show.

Steps to reproduce

  1. <Scene key="login" component={LoginForm} sceneStyle={{ paddingTop: 0 }} panHandlers={null} // disables swiping back navigationBarTitleImage={require('../assets/images/navbar-logo.png')} /> </Scene>

I will add that this is the first time I’m trying to use navigationBarTitleImage.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 18 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @omerdn1! Thanks for your response.

I just tried using master but then react-native start started giving this error:

Failed to build DependencyGraph: @providesModule naming collision:
  Duplicate module name: jsc-heap-capture
  Paths: /path-to-app/node_modules/react-native-router-flux/node_modules/react-native/local-cli/server/middleware/heapCapture/package.json collides with /path-to-app/node_modules/react-native/local-cli/server/middleware/heapCapture/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
Error: @providesModule naming collision:
  Duplicate module name: jsc-heap-capture
  Paths: /path-to-app/node_modules/react-native-router-flux/node_modules/react-native/local-cli/server/middleware/heapCapture/package.json collides with /path-to-app/node_modules/react-native/local-cli/server/middleware/heapCapture/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
    at HasteMap._updateHasteMap (/path-to-app/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:158:13)
    at /path-to-app/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:133:31
error Command failed with exit code 1.

Any idea on how to solve it?

Regards

Hi, thank you for this awesome module!

I also have the same issue:

  • react-native v0.42.0
  • react-native-router-flux v3.38.0

Just noticed I wasn’t using the latest (master) build. Anyways, for best styling you have to change titleWrapperStyle, navigationBarStyle, and navigationBarTitleImageStyle defaults. titleWrapperStyle: marginTop: 0, position: 'relative', top: 0 navigationBarStyle: justifyContent: 'center', alignItems: 'center' navigationBarTitleImageStyle: resizeMode: 'contain' and of course include width, height

The problem with this approach though is that everytime you do npm i to install a new dep that node_modules will come back.

@m-revetria I did it. The problem comes when you install from a git repository. If you just delete the folder node_modules from react-native-router-flux inside your project’s node_modules, it will be ok. Let us know if it works.