How do I access React-native button(TouchableHighlight) in test case

I am writing automation test for my ReactNative app. But I’m unable to access react native components in appium. Even Appium inspector can’t inspect inside react native view.

I’m trying something like this :

it("Testing Automation", function () {
    return driver
        .waitForElementById('LogoutButton', 5000).click()
    // Use Appium inspector for inspecting elements

Is there anyway to know react native component’s Xpath or anyway to access them by any other attribute. Thanks