typeerror: (0 , _react.createContext) is not a function.
Answered
aprilia posted this in #help-forum
apriliaOP
- error ../node_modules/react-native-web/dist/cjs/modules/useLocale/index.js (23:59) @ defaultLocale
- error Error [TypeError]: (0 , _react.createContext) is not a function
at eval (webpack-internal:///(rsc)/../../node_modules/react-native-web/dist/cjs/modules/useLocale/index.js:20:60)
at (rsc)/../../node_modules/react-native-web/dist/cjs/modules/useLocale/index.js (/home/aprilia/Projects/nodejs/a2a-point2/apps/www/.next/server/app/page.js:23870:1)
at __webpack_require__ (/home/aprilia/Projects/nodejs/a2a-point2/apps/www/.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(rsc)/../../node_modules/react-native-web/dist/cjs/exports/createElement/index.js:8:18)
at (rsc)/../../node_modules/react-native-web/dist/cjs/exports/createElement/index.js (/home/aprilia/Projects/nodejs/a2a-point2/apps/www/.next/server/app/page.js:23441:1)
at __webpack_require__ (/home/aprilia/Projects/nodejs/a2a-point2/apps/www/.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(rsc)/../../node_modules/react-native-web/dist/cjs/index.js:5:45)
at (rsc)/../../node_modules/react-native-web/dist/cjs/index.js (/home/aprilia/Projects/nodejs/a2a-point2/apps/www/.next/server/app/page.js:23529:1)
at __webpack_require__ (/home/aprilia/Projects/nodejs/a2a-point2/apps/www/.next/server/webpack-runtime.js:33:43)
at eval (webpack-internal:///(rsc)/../../node_modules/react-native-css-interop/dist/runtime/web/color-scheme.js:6:24) {
digest: undefined
}
null
Answered by aprilia
seems like i need to make both the layout.tsx file as well as the page.tsx file as client components
7 Replies
apriliaOP
Ive added
use client
at the top of layout.tsx
file still its not working🤷♀️
i am transpiling react native modules and using it with next.js
is there a way to make everything cilent components by default in nextjs?
any help would be much appreciated 🙂
apriliaOP
seems like i need to make both the layout.tsx file as well as the page.tsx file as client components
Answer
apriliaOP
closing this