Closed Relaxe111 closed 3 years ago
Hello, I am apologize if question is stupid but I have hot discussions with my colleague about why in the https://github.com/microsoftgraph/msgraph-training-reactspa/blob/main/demo/graph-tutorial/src/GraphService.ts#L9 is used require but not import? could someone explain this cause and why is not used es6 import instead? Would it not work with import? Thank you in advance
Using import should work fine - there's no reason not to use it here. It would be something like:
import
import * as graph from '@microsoft/microsoft-graph-client';
Thank you )
Hello, I am apologize if question is stupid but I have hot discussions with my colleague about why in the https://github.com/microsoftgraph/msgraph-training-reactspa/blob/main/demo/graph-tutorial/src/GraphService.ts#L9 is used require but not import? could someone explain this cause and why is not used es6 import instead? Would it not work with import? Thank you in advance