thanks_in_advance
thanks_in_advance

Reputation: 2743

integrate a third party component

I'm using react-infinity as an example here. (Link to react-infinity's Readme)

After doing var Infinity = require('react-infinity'), you have access to an Infinity variable with various props.

(I presume Infinity is going to be used inside some component I create, e.g. myComponent)

This is where I am stumped. How am I supposed to use this Infinity variable?

Upvotes: 0

Views: 93

Answers (1)

canaan seaton
canaan seaton

Reputation: 6868

you would use it as just another JSX component as follows...

//.....
render() {
    return (
      <div>
         <Infinity {...props} />
      </div>
    );
}
//.....

where props are whatever properties the thirdparty component specs.

Upvotes: 1

Related Questions