Why is react-bootstrap not working with reactjs 0.14.3?

- 1 answer

Ad

I've just integrated both new versions of

  • react-bootstrap 0.28.1
  • reactjs 0.14.3

via CDN, but i can't get react-bootstrap to work if I use reactjs 0.14.3. If I downgrade to version 0.13.3 everything works fine.

Does anyone have a clue what has happened? Naming issue?

UPDATE ---------------

Actually it is not reacts itself but the DOM render! With the older version you've had to use JSXTransformer (0.13.3) and now this one is deprecated and one should use react-dom instead.

Is there a solution to this? How could I use the latest version of reactjs and react-bootstrap?

Ad

Answer

Ad

Found the solution.

It's actually just the way I was referencing the source code. Instead of

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/JSXTransformer.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.28.1/react-bootstrap.js"></script>

<script type="text/jsx">

   // React Code

   React.render(<Example/>, document.getElementById("example"));
</script>

I use

<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.28.1/react-bootstrap.js"></script>


<script type="text/babel">

   // React Code

   ReactDOM.render(<Example/>, document.getElementById("example"));
</script>

and it works.

Ad
source: stackoverflow.com
Ad