Open hrahul2605 opened 4 years ago
Hi . any plan to fix the warning ?
Hey @Unknown051 , i fixed it in my code by seprating the CalenderContext
in a different file and importing the same where ever needed.
Hey @Unknown051 , i fixed it in my code by seprating the
CalenderContext
in a different file and importing the same where ever needed.
@hrahul2605 thanks for the reply . I'm quite new to the npm and react native so i didn't get what you saying . I'm using it like :
import DatePicker from 'react-native-modern-datepicker'; <DatePicker options={defaultOptions} onSelectedChange={date => alert(date)} />
and the app gives the warning you reported . can you give me a more detailed example what should i do to remove the warning ? ( if its possible )
thanks
@Unknown051
If you check the file src/datePicker/DatePicker.js
const CalendarContext = createContext();
const useCalendar = () => {
const contextValue = useContext(CalendarContext);
return contextValue;
};
This piece of code is causing the warnings, just moving it to different file, that will fix the warnings.
Warning
I tend to have this warning message everytime my app reloads,can we update the package with this warning removed?