I am using the react Context to store some global states and functions. However, when I use a function defined in the context inside a useEffect hook, it causes a warning: &