React Native-如何将道具传递给子孙后代?

我想从孙辈那里获得道具而不直接传递它,就像在React Navigation或React Native Paper中一样

export default function Main() {
  return (
    <PaperProvider>
      <Something>
        <TextInput> //<== here TextInput able to access props.theme from ReactNativePaper, how can I do something like that? what should I make in the root component?
        </TextInput>
      </Something>
    </PaperProvider>
  );
}
评论