React implementation with external library (SDK)

0

I have the following problem, in the project that I am participating in React, the company is considering the possibility of acquiring a tool to capture images (selfie and documents). Something similar to what NuBank does today to open an account (selfie, document image front and back, etc.)

The company that provides the library / technology is link

A project demo, an HTML file with javascript, has been made available. The code is entirely in javascript (Vanilla), where functions in javascript are in HTML and HTML in turn calls the main JS script.

When I tried to implement in the project in react, it presents the error 'is not defined'

I tried to manually import the functions but presented another error 'unexpected use of self no-restrict-globals';

import { IcarSDK, videoInput} from './../assets/js/icarSDK.js';

Someone has a light on how I can implement the library or some way forward.

OBs: Library not available via NPM.

Example > link

    
asked by anonymous 04.10.2018 / 03:18

0 answers