Currently, I am working with the latest Expo-Router version which incorporates file-based navigation. To establish a universal language context in my application, I have utilized React's context API along with the useReducer hook. However, I am encountering an issue as I am unsure where to wrap the context provider since there does not seem to be a root component available.
Here is the structure of my project:
app
Dashboard.tsx
index.tsx
Login.tsx
Profile.tsx
assets
components
Button.tsx
Drawer.tsx
DrawerItem.tsx
HR.tsx
TextField.tsx
forms
LoginForm.tsx
ts
declarations.d.ts
.gitignore
app.json
babel.config.js
index.ts
metro.config.js
package.json
tsconfig.json
yarn.lock
Within the index.ts
file:
import "expo-router/entry"
I came across a related discussion on Github regarding this issue, although it appears that I do not have an '_layout' file to work with.