I'm adding infinite scrolling to a table in an old project based on ruby on rails. I installed it using bower and imported it through //= require react-infinite in application.js because other js libraries were imported this way. var Infinite = require('react-infinite'); would raise an error "ReferenceError: require is not defined". Then I used it like this:
I'm adding infinite scrolling to a table in an old project based on ruby on rails. I installed it using bower and imported it through
//= require react-infinite
in application.js because other js libraries were imported this way.var Infinite = require('react-infinite');
would raise an error "ReferenceError: require is not defined". Then I used it like this:But in the console, there is an error "Error: Cannot find module 'prop-types". How could I make it work?