I am very new to react. I grabbed the petclinic project from github (https://github.com/spring-petclinic/spring-petclinic-reactjs) to run it and understand how react works. I want to add plugins to this project (plugins are other react projects as I understand), The plugin I want to add is a datatable (https://github.com/rishabhbits038/react-tabelify) which is another react project. My question is how to integrate one react project inside the other. in jquery it is direct, just including the .js file in the project but in react it does not seem that obvious.
1 Answer
From inside the petclinic project, run
npm install react-tabelify
and import the component you want use as:
import Tabelify from 'react-tabelify';
should work, as the second library is registered with npm
9 Comments
azium
missing string in import
pwolaq
I would suggest changing to
npm install react-tabelify --saveRodwan Bakkar
I will try this solution and report in the comments. Thank you guys.
Rodwan Bakkar
Thank you very much Dane:))
Nima habibkhoda
this is old question , but you can use this repository : github.com/nimahkh/react-all-in-one-package it helps me
|
npm installthe component and import it wherever you want to use it.