react-native-paper does not work on react-native 0.58.x
See original GitHub issueCurrent behaviour
ReactNativePaper is not working in lastet version of reactnative 0.58 and 0.58.1
Expected behaviour
Code sample
/**
* @format
* @lint-ignore-every XPLATJSCOPYRIGHT1
*/
import React from "react";
import { AppRegistry } from "react-native";
import { name as appName } from "./app.json";
import {
Provider,
Button,
DarkTheme,
Surface,
Text,
Card
} from "react-native-paper";
const Main = () => (
<Provider theme={DarkTheme}>
<Card elevation={1}>
<Card.Content>
<Text>Hello o</Text>
</Card.Content>
</Card>
</Provider>
);
AppRegistry.registerComponent(appName, () => Main);
Screenshots (if applicable)
What have you tried
Your Environment
software | version |
---|---|
ios or android | android |
react-native | 58.1 |
react-native-paper | 2.6.3 |
node | 8.11.3 |
npm or yarn | 1.10.1 |
Package.json code
{
"name": "barbendingEstimation",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.3",
"react-native": "0.58.1",
"react-native-paper": "^2.6.3",
"react-native-vector-icons": "^6.2.0"
},
"devDependencies": {
"babel-core": "7.0.0-bridge.0",
"babel-jest": "24.0.0",
"jest": "24.0.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:14 (2 by maintainers)
Top Results From Across the Web
react-native-paper - npm
React Native Paper is the cross-platform UI kit library containing a collection of customizable and production-ready components, ...
Read more >Getting Started · React Native Paper
Open a Terminal in your project's folder and run: yarn add react-native-paper. or npm install react-native-paper. From v5 there is a need to...
Read more >React Native Paper
React Native Paper is a high-quality, standard-compliant Material Design library that has ... It is responsive, fast and works reliably on both platforms....
Read more >Troubleshooting - React Native
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here,...
Read more >React Native <NavigationContainer> not styling-React Native
import React from "react"; import { StyleSheet, Text, View } from "react-native"; const App = () => ( <View style={styles.container}> {/* <-- note...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm this as adding style={{elevation: 1}} on button works like a bomb 🙌🏻
@syedabuthahirm @satya164 my bad! The issue wasn’t related to react-native-paper anymore! The last version actually solves the problem. The bug I face is related only to the new version of react-native (basically it throws me error when I have something like width, right, height, etc. calculated dynamically directly into the style).