Open oruhtra opened 6 years ago
The react-materialize
v2 library works with materialize-css
v0.100.2, which indeed depends on jQuery, but support for materialize-css
v1.0.0 is actively being developed under the 3.0.0-beta
branch in react-materialize
. Try "materialize-css": "^0.100.2",
in your package.json
dependencies.
Thanks, indeed it works.
However I now get the issue "menu.velocity is not a function"
when using the SideNav component. Still using the same webpack config (and now "materialize-css": "^0.100.2"
in my package.json).
Many people seem to be getting that issue but no solution works for me..
SOLUTION I FOUND : Using expose-loader loader for Webpack makes it work just fine !
I'm trying to create a select field on a form using the Input component, but get the following error :
TypeError: $(...).material_select is not a function (Input.js:68)
I'm using webpack to bundle my app and my external libraries.
In my Webpack config I have the following (to make $ available everywhere):
My component looks like:
My package.json looks like:
In some other part of my app (that is not rendered by REACT), I successfully use materialize js methods (the following code for example works fine):
I looked at all the related issues and answers provided, but none worked in my case. It looks as if the react-materialize module doesn't have access to materialize js methods, and I don't know how to solve that issue... Any help welcome !!