Why is react-bootstrap not working with reactjs 0.14.3?
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
Related Questions
Ad
- → Import statement and Babel
- → should I choose reactjs+f7 or f7+vue.js?
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → .tsx webpack compile fails: Unexpected token <
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → React Native with visual studio 2015 IDE
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM
- → How do I determine if a new ReactJS session and/or Browser session has started?
- → Alt @decorators in React-Native
- → How to dynamically add class to parent div of focused input field?
Ad