Runtime components : Client engine : Using the client engine service in a React project : How the client engine is used in the UDTTReactProject application
  
How the client engine is used in the UDTTReactProject application
The following design decisions were made in developing the UDTTReactProject application:
Redux is used to manage the state that is read or written in more than one component, the states are devMode and user.
The file structure is organized according to its business meanings, see ../src/user.
Legacy libraries are not refactored for this application, see ../src/user/auth.service.ts.
The UDTT client engine (../UDTTReactProject/public/unicomsi/btt/clientengine) is treated as a legacy third-party library. It is loaded into the application by the addition of the following lines in ../UDTTReactProject/public/index.html:
<script src="/jquery/jquery-3.3.1.js"></script>
<script src="/unicomsi/btt/clientengine/BTTLoader.js"></script>
<script>
// load from the integrated JS of client engine
// here it is /assets/unicomsi/btt-clientEngine.uncompressed.js
// BTT.loadBTT("%PUBLIC_URL%", "unicomsi/btt-clientEngine.uncompressed.js");
// load from the source JS of client engine at %PUBLIC_URL% folder
BTT.loadBTT("%PUBLIC_URL%");
</script>
Because the client engine is written in raw JS, a thin service layer (../UDTTReactProject/src/unicomsi/btt/clientengine/service) is provided at the TypeScript level. This service layer is used to interact with UDTT server.
. ../UDTTReactProject/src/UDTTService.ts is used to ensure that there is a single instance of the service layer.
For information about using the React component, see /src/trans/transfer/Transfer.component.tsx.
For information about using Redux, see /src/user/redux.tsx.
For information about using the API, see Client engine service: APIs.
Go up to
Using the client engine service in a React project