How can I load the React-Redux (React binding for Redux) JavaScript library onto a web page with a simple script tag?
I have seen examples of loading React-Redux as an NPM module from node_modules, but in my case that is not an option.
I'm after something like this:
<!-- load React-Redux with simple script tag -->
<script src="....."></script>
<script>
// Cannot use npm modules from node_modules, so cannot use
// import { Provider } from "react-redux";
// Assign Provider and connect variable if needed from
// some symbol defined in the .js file that was loaded
// by the script tag
var Provider = ....;
var connect = ....;
// Load my own hypothetical ES6 modules (not relevant to this question)
import store from "./store";
import App from "./App";
const rootElement = document.getElementById("root");
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
rootElement
);
</script>