Comments (1)
if your index.tsx or index.jsx is your root file, you need to wrap your <App/>
inside Provider from react-native-paper.
as shown in example index.tsx or you can through react native paper docs Setup your React Native Paper
Usage
Wrap your root component in Provider from react-native-paper. If you have a vanilla React Native project, it's a good idea to add it in the component which is passed to AppRegistry.registerComponent. This will usually be in the index.js file. If you have an Expo project, you can do this inside the exported component in the App.js file.
Example:
import * as React from 'react';
import { AppRegistry } from 'react-native';
import { Provider as PaperProvider } from 'react-native-paper';
import { name as appName } from './app.json';
import App from './src/App';
export default function Main() {
return (
<PaperProvider>
<App />
</PaperProvider>
);
}
AppRegistry.registerComponent(appName, () => Main);
The PaperProvider component provides the theme to all the components in the framework. It also acts as a portal to components which need to be rendered at the top level.
If you have another provider (such as Redux), wrap it outside PaperProvider so that the context is available to components rendered inside a Modal from the library:
import * as React from 'react';
import { Provider as PaperProvider } from 'react-native-paper';
import { Provider as StoreProvider } from 'react-redux';
import App from './src/App';
import store from './store';
export default function Main() {
return (
<StoreProvider store={store}>
<PaperProvider>
<App />
</PaperProvider>
</StoreProvider>
);
}
from react-native-paper-select.
Related Issues (20)
- Support for left icon HOT 1
- Unable to change option color HOT 1
- Hi , whenever i click on the item it will select all items in the dropdown even though i was passing multiEnable false
- Hi , whenever i click on the item it will select all items in the dropdown even though i was passing multiEnable false HOT 4
- Static Modal Content Issue HOT 1
- Madal not respond to KeyboardAvoidingView HOT 2
- TextInput OutlineStyle
- Feature Needed: Support to be able to have Checkbox.android on ios HOT 2
- label not showing in darkmode HOT 1
- Cannot apply textInputStyle color HOT 1
- outlineColor in textInputProps is not working in iOs, but working fine in android HOT 1
- Use Paper theme by default HOT 4
- Cannot read property 'level3' of undefined HOT 1
- Feature request: Disable Option HOT 2
- Modal Close Button Text width HOT 1
- Using testID
- Is library still actively maintained? HOT 5
- tsc compile error in `src/interface/paperSelect.interface.ts` HOT 1
- PaperSelect inside a Modal HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-paper-select.