Lesson 10: TypeError: createContext only works in Client Components #5442
-
OverviewI am stuck at this issue (https://youtu.be/gyMwXuJrbJQ?t=61102). My Repo: https://github.com/Jatinkkalra/nextjs-smartcontract-lottery If anyone can find out the issue, would mean a lot. Thanks in advance!🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
May 7, 2023
Replies: 1 comment 3 replies
-
@Jatinkkalra It looks like an update in Next.js 13 see this here LINK |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Jatinkkalra I check your code as well as I worked on the fresh project and realized that it is not the issue with your code instead the
import { MoralisProvider } from "react-moralis";
is not compatible with next.js 13.I would recommend you to learn on the same old version of next.js because some of the web3 dependencies are still supporting older versions and later you can move to the latest version when you start working on your own projects.
you can use this command to create the same version of the project which Partick used.
npx create-next-app@12.1.5