react-native-paper-dates icon indicating copy to clipboard operation
react-native-paper-dates copied to clipboard

Warning for require cycles

Open KristianDikov opened this issue 4 years ago • 1 comments

Hi, every time when i run my RN App and these warnings are shown, please fix this issue. Early i used 0.5.1, now migrated to 0.7.0 but warnings are still there.

  • react-native: 0.64.1
  • react-native-paper-dates: 0.7.0
  • node: 14.17.5

` WARN Require cycle: node_modules\react-native-paper-dates\src\Date\DatePickerModal.tsx -> node_modules\react-native-paper-dates\src\Date\DatePickerModalContent.tsx -> node_modules\react-native-paper-dates\src\Date\CalendarEdit.tsx -> node_modules\react-native-paper-dates\src\Date\DatePickerInput.tsx -> node_modules\react-native-paper-dates\src\Date\DatePickerModal.tsx

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. WARN Require cycle: node_modules\react-native-paper-dates\src\index.tsx -> node_modules\react-native-paper-dates\src\Date\DatePickerModal.tsx -> node_modules\react-native-paper-dates\src\Date\DatePickerModalContent.tsx -> node_modules\react-native-paper-dates\src\Date\CalendarEdit.tsx -> node_modules\react-native-paper-dates\src\Date\DatePickerInput.tsx -> node_modules\react-native-paper-dates\src\Date\inputUtils.ts -> node_modules\react-native-paper-dates\src\index.tsx

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. WARN Require cycle: node_modules\react-native-paper-dates\src\Time\TimePicker.tsx -> node_modules\react-native-paper-dates\src\Time\AnalogClock.tsx -> node_modules\react-native-paper-dates\src\Time\AnalogClockHours.tsx -> node_modules\react-native-paper-dates\src\Time\TimePicker.tsx

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. WARN Require cycle: node_modules\react-native-paper-dates\src\Time\TimePicker.tsx -> node_modules\react-native-paper-dates\src\Time\AnalogClock.tsx -> node_modules\react-native-paper-dates\src\Time\TimePicker.tsx

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle. WARN Require cycle: node_modules\react-native-paper-dates\src\Time\TimePicker.tsx -> node_modules\react-native-paper-dates\src\Time\TimeInputs.tsx -> node_modules\react-native-paper-dates\src\Time\AmPmSwitcher.tsx -> node_modules\react-native-paper-dates\src\Time\TimePicker.tsx`

KristianDikov avatar Nov 15 '21 13:11 KristianDikov

You can put this as temporary workaround in your App.tsx render,

import {
  LogBox,
} from 'react-native';

function App() {
    React.useEffect(() => {
        LogBox.ignoreLogs(['Require cycle']);
    }, []);

   return <....etc />

}

    
    ```

RichardLindhout avatar Dec 04 '21 11:12 RichardLindhout

Fixed in next release!

RichardLindhout avatar Aug 25 '22 19:08 RichardLindhout