The required package in combination meteor + reaction + reaction-bootstrap

I used the following packages individually and combined

$ meteor add react
$ meteor add firfi:meteor-react-bootstrap

When I used the package react, bootstrap does not work.

If I use firfi:meteor-react-bootstrap, the reaction packet does not work.

When I used both packages, there is an error

Missed error : Invariant violation: addComponentAsRefTo (...): only ReactOwner can have links. This usually means that you are trying to add ref to a component that does not have an owner (i.e. it was not created inside another method render). Try visualizing this component inside the new top-level component that will contain the link.

Can anyone suggest a reaction pack and a bootstrap reaction for a meteor ?

My code is :

var { Modal,Button,Input} = ReactBootstrap;
if (Meteor.isClient){    
   Meteor.startup(function () {        
   console.log("METEOR STARTUP");
   React.render(<MyModal/>, document.getElementById('modal-container'));
});
}


var MyModal = React.createClass({
    render: function() {
    return (
        <div className="modal-open">
            <Modal
                title='Modeltest'
                backdrop={true}
                animation={false}
                closeButton={true}
                onRequestHide={() => {}}>    
                <div className='modal-body'>
                    <p>Check the Modal body</p>
                </div>
            </Modal>
        </div>
        )
    }
});
0
source share
1 answer

I tried several alternatives, and the kit that works best for me today is:

react                     0.1.13  Everything you need to use React with Meteor.
twbs:bootstrap            3.3.5  The most popular front-end framework for developing responsive, mobile first projects on the web.
universe:react-bootstrap  0.24.0  ReactBootstrap project wrapped for Meteor with Universe:modules

Version 0.24 is a bit outdated today, but in any case you cannot use the latest version of React-Bootstrap, since it requires React 0.14, for which Meteor has not yet been updated. (See Meteor issue # 116 )

0
source

Source: https://habr.com/ru/post/1618072/


All Articles