material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Invalid hook call. Hooks can only be called inside of the body of a function component

Open soufianeAe55 opened this issue 7 years ago • 2 comments

Describe the bug Hi guys i tried to install materiel-table inside my project but i got this problem. Invalid hook call. Hooks can only be called inside of the body of a function component

any one now how to fix it "devDependencies": { "axios": "^0.16.2", "babel-preset-react": "^6.23.0", "bootstrap-sass": "^3.3.7", "cross-env": "^5.0.1", "file-loader": "^3.0.1", "jquery": "^3.4.1", "laravel-mix": "^1.0", "lodash": "^4.17.4", "react": "^16.8.6", "react-dom": "^16.8.6", "url-loader": "^1.1.2" },

soufianeAe55 avatar May 11 '19 01:05 soufianeAe55

This might not be a material-table component error but a hooks usage error instead in your project instead.

theamanbhargava avatar May 13 '19 12:05 theamanbhargava

The documentation helps to me :) https://reactjs.org/warnings/invalid-hook-call-warning.html

Concretely the breaking the rules of hooks: https://reactjs.org/warnings/invalid-hook-call-warning.html#breaking-the-rules-of-hooks

OscarGalindo avatar Jun 11 '19 13:06 OscarGalindo