npm install protobufjs
create a bash script with this content in it
SRC_DIR= #folder containing protofiles
DEST_DIR=#destition directory
if [ ! -d "${DEST_DIR}" ]; then
| import { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'; | |
| import { useEffect, useState } from 'react'; | |
| interface IRequestHookConfig { | |
| // request params | |
| params?: any; | |
| // guards are like middlewares that run when a response is returned, before the state changes | |
| // multiple guards can be added for different kind of checks | |
| guards?: Array<(response: any, err: AxiosError | null) => Promise<void>>; | |
| } |
npm install protobufjs
create a bash script with this content in it
SRC_DIR= #folder containing protofiles
DEST_DIR=#destition directory
if [ ! -d "${DEST_DIR}" ]; then
| # install these | |
| -style-loader | |
| -sass-loader | |
| -css-loader | |
| -wepack | |
| -webpack-cli | |
| -terser-webapack-plugin | |
| #now the code (for react ) |