I am trying to do react context on a function. Initially, i created react context in the same file as the provider, but than i got a warning on the console saying that i should