React-native-router-flux: Removal of Scene Shadows by getSceneStyle is not applied

Created on 15 Feb 2018  路  4Comments  路  Source: aksonov/react-native-router-flux

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.27
  • react-native v0.51.0

Expected behaviour

I want to remove the shadow of all scenes when the router is wrapped by the SafeAreaView.

Actual behaviour

The getSceneStyle gets is not applied
screen shot 2018-02-15 at 11 02 38 am

Steps to reproduce

My Code

const getSceneStyle = () => ({
    shadowColor: 'transparent',
    shadowOffset: {
        width: 0,
        height: 0
    },
    shadowRadius: 0,
    shadowOpacity: 0
});

export default function AppContainer() {
    return (
        <ApolloProvider client={client} store={store}>
            <Root>
                <SafeAreaView style={AppStyles.appContainer}>
                    <RouterWithRedux
                        getSceneStyle={getSceneStyle}
                        navigator={AppRoutes}/>
                </SafeAreaView>
            </Root>
        </ApolloProvider>
    );
}

Most helpful comment

Please try to reproduce it with Example project and latest version 4.0.0-beta.40. Feel free to open if the issue still exists

All 4 comments

don't warp your Router with SafeAreaView just warp your content

same here : (

Please try to reproduce it with Example project and latest version 4.0.0-beta.40. Feel free to open if the issue still exists

Pretty late to answer but for v4.0.6, if you're not using SafeAreaView, you can follow this guy solution

<Scene //<-- highest Scene
   headerStyle= {{
        elevation: 0,
        shadowOpacity: 0,
        borderBottomWidth: 0,
      }}
/>

If you have SafeAreaView, you can do this

<Scene //<-- highest Scene
  cardStyle= {{ shadowColor: 'transparent' }}
/>

refer this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sarovin picture sarovin  路  3Comments

fgrs picture fgrs  路  3Comments

llgoer picture llgoer  路  3Comments

tonypeng picture tonypeng  路  3Comments

basdvries picture basdvries  路  3Comments