Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
Do we need to wrap all the screens with NativeBaseProvider in Native Base - React Native?

I have 3 screens here for example:

  1. AuthScreen
  2. HomeScreen
  3. LoginScreen

AuthScreen.js, HomeScreen.js, LoginScreen.js and have their respective content inside. And they are called by <Stack.Navigator> as shown in the link here

<NativeBaseProvider>
.
.
.
</NativeBaseProvider>

Is there a way I can just write the NativeBaseProvider once than have to do it on every screens?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

NativeBaseProvider is a component that makes the theme available throughout your app. It uses React's Context API. Add NativeBaseProvider to the root of your app and update App.js as follows:

import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { NativeBaseProvider } from 'native-base';

const Stack = createNativeStackNavigator();

export default function App() {
  return (
   <NativeBaseProvider>
     <NavigationContainer>
       <Stack.Navigator>{/* ... */}</Stack.Navigator>
     </NavigationContainer>
    </NativeBaseProvider>
  );
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!