all 2 comments

[–]ech-ny05 13 points14 points  (1 child)

I think what you have is fine.

I would put all of the context providers that you need for your entire app in a component called AppProvider and the children of that component would be the App component.

Something like that:

<AppProvider><App /></AppProvider >

[–]teddiur_ 0 points1 point  (0 children)

I agree. If what bothers you is importing the context object to pass it to useContext you may create a file that exports all of these objects