sandarshnaroju / react-native-nano

Build mobile apps in JSON
https://nanoapp.dev
87 stars 5 forks source link

important #10

Closed beyons closed 7 months ago

beyons commented 7 months ago

Hi with last version of react native nano i canno hide appbar with "headerShown": false and style had any effect

why ?

const splashScreen = { name: 'SplashScreen', screen: { v1: [avatar_image, countText, customWBView, customMLView, customDRView, next], }, onStart:({ route, setUi, getUi })=>{ NetInfo.fetch().then(state => { if( state.isConnected == true ){ /setTimeout((e)=>{ navigation.push("loginScreen")
},1000)
/ } else{ Alert.alert("Error:: network connection failed, Check your connection."); } }); }, onEnd:({ route, setUi, getUi })=>{

}, onResume:({ route, setUi, getUi })=>{

}, onPause:({ route, setUi, getUi })=>{

}, screenProps: { options: { "headerShown": false } }, style: { flex: 1, justifyContent: 'center', backgroundColor: "#222222" }, };

sandeshnaroju commented 7 months ago

Actually we have updated code little bit in newer version but docs we have not updated, we felt we should move styles into props and keep the same name for all components instead of name screenProps. Here is the updated way to do it, we update document soon,


const Screen = {
  name: 'screen',
  screen: {
    v1: [

    ],
  },
  props: {
    screenProps: {
      options: {
        headerShown: true,
        headerTitle: 'Profile ',
        headerBackTitleVisible: false,
      },
    },
    style: {
      flex: 1,
      backgroundColor: 'whiteAndDarkBlue',
      alignItems: 'center',
      justifyContent: 'center',
    },
    scrollViewProps: {
      contentContainerStyle: {
        paddingTop: 100,
        paddingBottom: 300,
        alignItems: 'center',
        justifyContent: 'center',
      },
    },
    scroll: true, // use it to scroll screen up and down
  },
}
sandarshnaroju commented 7 months ago

Hey @beyons , we have updated the docs reflecting the changes discussed above. you can find it at https://docs.nanoapp.dev/docs/getting-started/quick-start