-1

I want to install jquery and materialize-css into my React application using npm, and import it in my React application (I don't want to use CDNs or import in the index.html file).

Please how do I do that?

Awa Desmoline
  • 495
  • 4
  • 26

1 Answers1

2

You can do this by using a bundler like webpack or browserify. Typically in combination with babel. A quick search gave me this link: https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel.

ES6 -> Webpack -> Babel (ES6/JSX) -> ES5 bundle.

Personally I would use this to import more specialized libraries instead of jQuery but you can definitely do this.

Sven van de Scheur
  • 1,809
  • 2
  • 15
  • 31