React-native-paper: Require cycle

Created on 12 Dec 2019  路  4Comments  路  Source: callstack/react-native-paper

Hi
I'm getting a require cycle warning from the radio RadioButton componenet:

: node_modules/react-native-paper/lib/module/components/RadioButton/RadioButton.js -> node_modules/react-native-paper/lib/module/components/RadioButton/RadioButtonItem.js -> node_modules/react-native-paper/lib/module/components/RadioButton/RadioButton.js

Why is this happening ?

Most helpful comment

@ilibilibom We have cycle dependencies in our codebase, but it's not causing any issues. Metro warns about them, but you can safely silent them with YellowBox.ignoreWarnings(['Require cycle:']);. We know that it's not a perfect solution, but we don't want to change our working architecture, because other tool don't like it.

All 4 comments

@ilibilibom We have cycle dependencies in our codebase, but it's not causing any issues. Metro warns about them, but you can safely silent them with YellowBox.ignoreWarnings(['Require cycle:']);. We know that it's not a perfect solution, but we don't want to change our working architecture, because other tool don't like it.

ok - where do I set this ?

YellowBox.ignoreWarnings(['Require cycle:']);

@ilibilibom Probably the best place is top of the index.js or whatever your entry point is. Also, please import YellowBox from react-native before.

ok Thanks

Was this page helpful?
0 / 5 - 0 ratings