1// To view which version of React is/was used for a particular app, type in the below in commandline/terminal.
2npm view react version
3npm view react-native version
1import React from 'react';
2
3function getReactVersion() {
4 return React.version;
5}
1const REACT_VERSION = React.version;
2
3ReactDOM.render(
4 <div>React version: {REACT_VERSION}</div>,
5 document.getElementById('root')
6);
7<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.min.js"></script>
8<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.min.js"></script>
9
10<div id="root"></div>