Dmitry
Dmitry

Reputation: 737

Using Bootstrap with Meteor and React

Can not find a clear way to use Bootstrap with Meteor-React combination. There are a number of packages in Atmosphere which expected to exposure global variable with consequent references to Bootstrap functionality, but after, for example,

meteor add universe:react-bootstrap
import BS from 'bootstrap';

system complaints that 'bootstrap' is not defined.

What I did now, I included CDNs for Bootstrap nd jQuery directly into my client's main.html, and got it working:

render() {
        return (
            <li>
                {this.props.ad.text}
                <button type="button" className="btn btn-default btn-lg">
                    <span className="glyphicon glyphicon-star" aria-hidden="true"></span> Star
                </button>
            </li>
        );
    }

But it is not seems a good solution. jQuery is included in Meteor app by default, how to reference it? When I tried to add twbs:bootstrap package, it is also not clear how to include it in html. Simply added, it does not work.

Upvotes: 1

Views: 1485

Answers (1)

kkkkkkk
kkkkkkk

Reputation: 7748

To use React with Bootstrap, you should use this module react-bootstrap. It has been out there for sometimes and seems still good. I use it for some of my Meteor React projects, I have nothing to complain till now.

Upvotes: 0

Related Questions