Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

react native paper menu item press not working

I've discovered ReactNative provides a way to inspect
DOM of application (with android, shake device, toggle inspect).
It turns out my menu item was shadowed by Context.Consumer.
When I removed <Provider> tags from my render () section,
it finally worked (was able to handle clicks).

Probably worth mentioning: from the very beginning my
AppContainer at the top most level was wrapped like this:

      <PaperProvider>
        <StatusBar
          backgroundColor={Colors.TOOLBAR_BACKGROUND}
          barStyle="light-content"
        />
        <AppContainer />
      </PaperProvider>
 
PREVIOUS NEXT
Tagged: #react #native #paper #menu #item #press #working
ADD COMMENT
Topic
Name
3+9 =