Same problem...
Duplicate of #639
I`m still getting the warnings, what could it be?
I`m still getting the warnings, what could it be?
Check this out :
https://stackoverflow.com/questions/55664673/require-cycles-are-allowed-but-can-result-in-uninitialized-values-consider-ref/58459108#58459108
Still getting this issue.
@harveyconnor
Import each Item separate , for example you need a List Section with an accordion and a list item so go like :
import ListSection from 'react-native-paper/lib/commonjs/components/List/ListSection';
import ListAccordion from 'react-native-paper/lib/commonjs/components/List/ListAccordion';
import ListItem from 'react-native-paper/lib/commonjs/components/List/ListItem';
And then instead of
I solved this issue by doing this.
Place the import 'react-native-paper' at the very top of the Code.
A PR to fix this issue is open here https://github.com/callstack/react-native-paper/pull/1851. Please be patient it will be merged soon.
it solved this issue by doing this.
Place the import 'react-native-paper' at the very top of the Code. in the Index.js
i am still facing the issue. RN - version 62.2 "react-native-paper": "^3.10.1", please help. i am able to see blank screen on my emulator.
Place import { Provider as PaperProvider } from 'react-native-paper'; directly after import React from 'react';, otherwise you'll get those warnings.
Place
import { Provider as PaperProvider } from 'react-native-paper';directly afterimport React from 'react';, otherwise you'll get those warnings.
This worked, totally forgot to wrap the entire app in this
any update on this issue?
Still happening here as well. I'm hiding those warnings but it's not ideal.
LogBox.ignoreLogs(["Require cycle:"]);
still getting this issue
why is this closed? still getting same error on "react-native-paper": "^4.4.1" and "react-native": "0.63.3". Any workaround yet?
@harveyconnor
Import each Item separate , for example you need a List Section with an accordion and a list item so go like :
import ListSection from 'react-native-paper/lib/commonjs/components/List/ListSection';
import ListAccordion from 'react-native-paper/lib/commonjs/components/List/ListAccordion';
import ListItem from 'react-native-paper/lib/commonjs/components/List/ListItem';And then instead of
(like in the docs) you use < ListSection > . That should be enough
For people wondering ... This Fixed my problem...
@harveyconnor
@BatDroid's suggestion worked well for me. In my index.js file I imported directly from the modules' directory.
instead of
import {Provider as PaperProvider} from 'react-native-paper';
try importing like:
import PageProvider from 'react-native-paper/lib/commonjs/core/Provider';
It works well for me!
still looking for a solution
add module:react-native-paper/babel to your babel.config.js.
My babel.config.js:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
["module:react-native-dotenv"],
["module:babel-plugin-module-resolver", {
"alias": {
"src": "./src"
}
}],
["module:react-native-paper/babel"]
]
};
Don't forget clear cache before rebuilding:
rm -rf /tmp/metro-*
npm start --reset-cache
Most helpful comment
Still getting this issue.