Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

look #676

Open
NuriaAgbasi opened this issue May 5, 2024 · 11 comments
Open

look #676

NuriaAgbasi opened this issue May 5, 2024 · 11 comments

Comments

@NuriaAgbasi
Copy link

Cannot read properties of null (reading 'useContext')
TypeError: Cannot read properties of null (reading 'useContext')
at useContext (http://localhost:3002/static/js/bundle.js:21236:25)
at useTheme (http://localhost:3002/static/js/bundle.js:19732:32)
at http://localhost:3002/static/js/bundle.js:19546:40
at renderWithHooks (http://localhost:3002/static/js/bundle.js:75858:22)
at updateForwardRef (http://localhost:3002/static/js/bundle.js:79107:24)
at beginWork (http://localhost:3002/static/js/bundle.js:81168:20)
at HTMLUnknownElement.callCallback (http://localhost:3002/static/js/bundle.js:66114:18)
at Object.invokeGuardedCallbackDev (http://localhost:3002/static/js/bundle.js:66158:20)
at invokeGuardedCallback (http://localhost:3002/static/js/bundle.js:66215:35)
at beginWork$1 (http://localhost:3002/static/js/bundle.js:86113:11)

@handhikadsa
Copy link

same here, i think there is a bug or something with the component

@eggert-plaio
Copy link

I got the same error, after I upgraded "react" and "react-dom" to version 18.3.1.
I had to downgrade those two packages to version 18.2.0 to be able to keep using "@material-tailwind/react".

@imaiomar
Copy link

imaiomar commented May 6, 2024

I got the same error, after I upgraded "react" and "react-dom" to version 18.3.1. I had to downgrade those two packages to version 18.2.0 to be able to keep using "@material-tailwind/react".

worked perfectly, thanks !

@NuriaAgbasi
Copy link
Author

I got the same error, after I upgraded "react" and "react-dom" to version 18.3.1. I had to downgrade those two packages to version 18.2.0 to be able to keep using "@material-tailwind/react".

It worked thanks 😊

@mike-katz
Copy link

is there no solution from material-tailwind team?

@mike-katz
Copy link

mike-katz commented May 14, 2024

I got the same error, after I upgraded "react" and "react-dom" to version 18.3.1. I had to downgrade those two packages to version 18.2.0 to be able to keep using "@material-tailwind/react".

Not working

@eggert-plaio
this is my package.json

{
  "name": "myapp",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@material-tailwind/react": "^2.0.4",
    "@testing-library/jest-dom": "^5.17.0",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-scripts": "5.0.1",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "tailwindcss": "^3.3.2"
  }
}

@handhikadsa
Copy link

I got the same error, after I upgraded "react" and "react-dom" to version 18.3.1. I had to downgrade those two packages to version 18.2.0 to be able to keep using "@material-tailwind/react".

Not working

@eggert-plaio this is my package.json

{
  "name": "myapp",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@material-tailwind/react": "^2.0.4",
    "@testing-library/jest-dom": "^5.17.0",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-scripts": "5.0.1",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "tailwindcss": "^3.3.2"
  }
}

dont use "^" instead do this:
"react": "18.2.0",
"react-dom": "18.2.0",

@mike-katz
Copy link

@handhikadsa

Working fine Thanks.

@Ravi-narola
Copy link

I got the same error, after I upgraded "react" and "react-dom" to version 18.3.1. I had to downgrade those two packages to version 18.2.0 to be able to keep using "@material-tailwind/react".

Working perfectly, Thanks 😊

@kylegendy
Copy link

Had a similar issue, downgraded material-tailwind to 2.0.5. This seems to be the same issue as this thread: #693 (comment)

@SecretBlackStar
Copy link

Wow, Working correctly, Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants