2

I'm using React Native to develop a mobile app. I am using Tailwind CSS and React Navigation in it. Should I wrap my App component like this

<TailwindProvider utilities={utilities}>
      <NavigationContainer>
        <Welcome />
      </NavigationContainer>
</TailwindProvider>

or

<NavigationContainer>
  <TailwindProvider utilities={utilities}>
     <Welcome />
  </TailwindProvider>
</NavigationContainer>

In general, how to nest these tags ? For example how to nest if I use Redux and how to bring in store provider ?

1 Answers1

0

Either is fine. Usually, libraries will mention whether the provider order matters. For example, if react-navigation used tailwind, then tailwind needs to wrap react-navigation. But in most cases, it doesn't matter how you nest the providers.

satya164
  • 9,464
  • 2
  • 31
  • 42