Client of Video Stream React Redux App
Status of ACTION script (Deployment):
npm install npm -g
npm update
npm i axios react-redux redux redux-form redux-thunk react-router-dom
npm audit fix
How To Install Node.js on Ubuntu 20.04
cd ~
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh
nano nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs
node -v
curl -L https://www.npmjs.com/install.sh | sh
npm_config_prefix=/some/path sh install.sh
npm -v
node -v && npm -v
v14.2.0
6.14.4
-
import Google API library (public/index.html): <script src="https://apis.google.com/js/api.js" ></script>
-
initialize Google API library (components/GoogleAuth.js):
componentDidMount() {
window.gapi.load('client:auth2', () => {
window.gapi.client.init({
clientId: '***********-*****************************.apps.googleusercontent.com',
scope: 'email'
}
)
}
)
}
-
src/index.js
import {createStore, applyMiddleware, compose} from "redux";
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(
reducers,
composeEnhancers(applyMiddleware())
);
-
Live demos to use the extension with:
-
Create debug session & refresh the page:
Samples / Authorizing and Making Authorized Requests
Methods and Classes / Google API Client LIbrary for Javascript