-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I am developing an app with React Native v0.54 and I am using React Navigation for the router. When I try to render a screen that is wrapped with my consumer, for some reason the wrapper don't pass the necessary data for the router and this breaks alot of features that I need, for example the title of my screen and the DrawerMenu title of this screen.
This happens only when I wrap my screen with my consumer using the decorator or exporting the function.
Any idea why or can you fix it?
This code doesn't work:
@ProdutoConsumer
export default class Notificacoes extends React.Component {
static navigationOptions = {
title: "Notificações"
}
render(){
return(
<View>
<Text>Notificações</Text>
</View>
)
}
}
This works:
export default class Notificacoes extends React.Component {
static navigationOptions = {
title: "Notificações"
}
render(){
return(
<View>
<Text>Notificações</Text>
</View>
)
}
}
EDIT: Testing a little more, I think the problem is that withContext is not passing static properties forward, but I don't know how to fix it neither a workaround yet.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working