Skip to content

cengit/react-navigation-custom-header-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

react-navigation-custom-header-example

library

"react-navigation": "^4.4.0",
"react-navigation-stack": "^2.8.2",

整个 stack 级别的自定义header, 放在 defaultNavigationOptions

defaultNavigationOptions:{
  header:<View><Text>default custom header</Text></View>
}

页面级别的自定义header, 放在 navigationOptions, 会覆盖stack的header

navigationOptions:{
  header:<View><Text>screen custom header</Text></View>
}

页面不需要header

navigationOptions:{ headerMode:'none' // 页面不需要 header }

注:例子只包含 navigator 的设置,RN项目代码,screen页面需要自己定义

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published